Site logo

Archived topic

Image sizing not working with Amazon Web Services and WP Offload Media

5 replies · Started by Meghan on January 21, 2019

Viewing posts 1–6 of 6

Hello,

I have come across a problem when setting the image sizes to use for blog archive and post featured images.
I enter height and width, and even though an image file already exists with the exact dimensions I receive this error:

WPSP_Resize.process() error: Image must be local: https://s3-eu-west-2.amazonaws.com/..jpg

All media for my website is on AWS, there are no duplicate local copies.

How can I make it work for non-local files?

I notice this error also occurs when setting image size in the wpshowposts plugin.

Can you add an option to select a pre-existing image size, such as thumbnail, medium, large, full?

Hi there,

Are you using WP Show Posts to display your posts? In that case, the default resizer does require you to use local images.

If you are using WPSP here, you can use this filter to change the default size:

add_filter( 'wpsp_default_image_size', function() {
    return 'thumbnail';
} );

Hi Tom

I am using GeneratePress theme with the pro plugin and WPShowPosts and both have this issue.

Would it be possible to add the ability to resize non-local files in a future version? WordPress core and other plugins work with offloaded files as if they are local, including the plugin Regenerate Thumbnails.

Many thanks, for your help, and by the way, thanks for your great theme!

On-the-fly image resizers typically don't work with off-site images, unfortunately.

The filter I mentioned above should work for WPSP - you'll just need to make sure the width/height options don't have values.

Then for GP, you can use a similar filter:

add_filter( 'generate_page_header_default_size', function() {
    return 'thumbnail';
} );

We're looking into better solutions than the on-the-fly resizers we're using right now. They have quite a few limitations unfortunately.

Hi Tom,

Thanks for the advice. Looking forward to seeing the improvements in this area.

No problem :)

This archived topic is closed to new replies.