verbb / image-resizer

A Craft CMS plugin to resize images on upload.
MIT License
128 stars 14 forks source link

Resizing existing S3 images errors ("No file exists at the given path", "Image already under maximum width/height") #30

Closed frankharrison-wj closed 6 years ago

frankharrison-wj commented 7 years ago

Hi

I'm just using this for the first time – looks like it's going to help some existing sites a lot! I'm getting a lot of errors though when I try to use it.

I'm trying to resize existing images on Amazon S3, and most of them either fail ("No file exists at the given path") or are skipped ("Image already under maximum width/height."). If I "View asset source" from the Assets panel, I see the images correctly on S3, and I can see that they are larger than the width/height limits set in ImageResizer. I've tried batch processing or doing them individually and get the same results.

It seems to work fine with new uploads, but I've got hundreds of existing images so really need to be able to batch process those.

Any thoughts as to what's going wrong?

Thanks in advance!

Edit: also noticed that the "crop image" function in the Assets panel doesn't seem to work when the image is on S3.

tehatjamberry commented 6 years ago

Having the same issue. Craft 2.6.2997, Resizer 1.0.1, S3 Buckets

svenjungnickel commented 6 years ago

Hey @frankharrison-wj and @tehatjamberry. Thanks for the issue. Unfortunately the handling of remote assets is a little tricky in craft2. Therefore I builded a fix in the latest Craft2 branch that will skip remote asset sources. That is better handled in craft3. The craft3 version will support resizing of remote assets though.

The cropping function is now working for remote assets in the Craft2 version.