Is there a good extra for creating image size variants?

Summary

Is there an Extra that can resize images on file upload? Eg create a thumbnail size, medium size, etc?

I’ve heard PHPThumb is not reliable or secure anymore.

Many thanks

Environment

MODX 2.5.7, LAMP

Where have you heard this?

Speaking of not secure: If I remember correctly all MODX versions minor 2.6.5. contain a vulneraibilty and should be updated asap.


If you want to resize images before they are uploaded to the media browser, there’s extras like ImageOptimOnUpload. I haven’t used that one in a while, though.

If I’m not mistaken extras like PHPThumb don’t resize on upload but can (only?) be used to create a smaller thumbnail to embed in the frontend.

PHPThumb is quite old indeed, maybe have a look at pThumb.

Now it is a rather old version of Modx you are using, and it is also a question of what is installed on the server that can handle images. But the pthumb extension should be pretty safe - and works here.

But after installing, check your system settings, then clear your cache - not only from manager - but also from /core/cache and reload.

However, there may be a legal issue with metadata about the photographer’s copyright, which is not included, which I need to look into more…

Now I’m confused.

Are we talking about the PHP library phpThumb (that is used by MODX) or one of the thumbnail extras phpThumbOf, phpThumbOn, phpThumbsUp?

Maybe I misunderstood the question here. I thought with PHPThumb the same named extra was meant.

I didn’t even know that such an extra exists.

The last update is from 2008!
Yes, I definitely wouldn’t use this extra anymore.

Says it on this extra PHPThumbFilter 0.6.1-rc2 | MODX Extras

This snippet has been pulled down due to a vulnerability in phpThumb. Please do not use this.

Haha yeah it’s an old project I haven’t come back to in a while.

That Extra looks perfect! Thanks

Services like Cloudflare Images might be helpful.

On my MODX 3.0.2 I am using the extras pThumb 2.3.3-pl [14.06.2014] and Resizer and I use webp images.
My decision was based on the PHP libraries that my host has installed, Imagick.
I also set the system setting “phpthumbof.use_resizer” to No because Resizer doesn’t(didn’t) handle webp. I believe pThumb being a fork of phpThumbOf it uses the latter’s setting names. If I remember right I had to install Resizer even though I told pThumb not to use it, I forget why.
In my PHP code I have lines like …
“$thumb = “[[pthumb &input=$file_name&options=w=$photo_w&h=$photo_h&zc=1&f=$format]]”;”
where $format is “webp” and the width and height are whatever I want. On first use the new sizes are cached so they don’t need to be recreated next time.
The thumb is used in “<img src=‘$thumb’ …”.