Skip to content

Improve Image Handling in wpsp_post_image #50

@selul

Description

@selul

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions