Forum

Thread tagged as: Question, Discussion

Does Perch handle image file size?

Site it quite slow because of some large images. I can give clients a guide, but sometimes they will upload a large file. Should Perch handle this, is it a server thing, or should I be handling it on my end?

Danny Turley

Danny Turley 0 points

  • 4 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Yes you can resize images in Perch, check out the documentation:

https://docs.grabaperch.com/templates/field-types/image/

I mean the file size, not the image size. i.e. if the user adds an image that is 1mb, can Perch compress that or is that something for us to consider?

Hi Danny,

I would recommend always using Perch to resize images that users upload - that removes the danger of really huge images appearing on the site. As part of the resizing you can set a quality level, which is how much the image should be compressed. The docs on that are here:

https://docs.grabaperch.com/templates/field-types/image/

So you could have something like:

<perch:content id="image" type="image" label="Image" width="1200" quality="60" />

Perch also has a Kraken add-on, which is an online image optimisation service. It is in the listing here:

https://addons.perchcms.com/

Thanks Mike, I will try Kraken out.