Currently, the wpsp_post_image function heavily relies on the image being local, and if it is not, it returns an empty URL, which breaks the image display.
To add more flexibility, I think it would be beneficial to have a way to filter the return value of WPSP_Resize, here:
https://github.com/tomusborne/wp-show-posts/blob/master/inc/functions.php#L191
Or maybe tweak the WPSP_Resize class:
https://github.com/tomusborne/wp-show-posts/blob/master/inc/image-resizer.php#L192
so that it returns the input URL if resizing fails.
This is currently breaking Optimole URLs (which are hosted remotely), but I believe it might have issues with any other plugin that hosts attachments remotely as well.
I’ve tried to address both of these points in this PR: #49
Thanks for considering this!
Currently, the
wpsp_post_imagefunction heavily relies on the image being local, and if it is not, it returns an empty URL, which breaks the image display.To add more flexibility, I think it would be beneficial to have a way to filter the return value of
WPSP_Resize, here:https://github.com/tomusborne/wp-show-posts/blob/master/inc/functions.php#L191
Or maybe tweak the
WPSP_Resizeclass:https://github.com/tomusborne/wp-show-posts/blob/master/inc/image-resizer.php#L192
so that it returns the input URL if resizing fails.
This is currently breaking Optimole URLs (which are hosted remotely), but I believe it might have issues with any other plugin that hosts attachments remotely as well.
I’ve tried to address both of these points in this PR: #49
Thanks for considering this!