WebberZone / contextual-related-posts

Contextual Related Posts WordPress plugin
https://webberzone.com/plugins/contextual-related-posts/
38 stars 23 forks source link

Explore passing the size name rather than an array #149

Closed ajaydsouza closed 2 years ago

ajaydsouza commented 3 years ago

https://github.com/WebberZone/contextual-related-posts/blob/a8cdd3949bfdcfde24a19b5c35a06bf2a75572b5/includes/media.php#L95

Passing the array of width and height doesn't always return the correct image size if hard cropped images are not available.

To explore - passing the size if crp_thumbnail is not selected but passing the image array if crp_thumbnail is selected but full size is returned because the correct image width is not available.

ajaydsouza commented 2 years ago

Fixed in https://github.com/WebberZone/contextual-related-posts/commit/a60a9de626f310c7913cb847d04046085b22a283