Parsely / wp-parsely

The official WordPress plugin for Parse.ly - makes it a snap to add the required tracking code to enable Parse.ly on your WordPress site.
https://wordpress.org/plugins/wp-parsely/
GNU General Public License v2.0
63 stars 32 forks source link

Recommendations Block: Featured images are limited to 120px width #703

Closed acicovic closed 2 years ago

acicovic commented 2 years ago

Edit: This issue was a bit broad and a research in progress. It has now been updated to be more specific to the problem encountered, and some other points mentioned here may be moved to other issues.

Is your feature request related to a problem?

The Recommendations Block shows poor quality images when those are set as a "Featured Image" in a post/page. The root of the issue is that we're passing to them a ?w=120 querystring in the plugin code.

To see this in action, let's take this API request as an example, which returns:

image_url: "https://wpvip.com/wp-content/uploads/sites/3/2022/02/StudioSimpatico.jpg?w=120"
thumb_url_medium: "https://images.parsely.com/dtC8RKDnBdyGCAbwBBhELPv7cgI=/85x85/smart/https%3A//wpvip.com/wp-content/uploads/sites/3/2022/02/StudioSimpatico.jpg%3Fw%3D120"

From the above we can see that:

This issue does not happen for external images.

acicovic commented 2 years ago

Note: It seems that the block downloads images for certain pages, even if those don't have an image_url in their metadata. Also, in the specific case they are external large images, not hosted within the website itself.

Edit: After research, it seems that if no image URL is specified in the metadata, the Parse.ly crawler will try to identify an image as the "page image" (this will typically be the first image that exists in the page) and set its path as the image_url. However, the main reason we didn't have an image URL in our metadata in most cases is also due to a bug. All this is tracked and discussed in #758 which should address all bugs mentioned here. Once the bugs are fixed, we can discuss about features.