Hi @rjdusk ,
I have reviewed your site and I see the images are stretched as the following one: https://res.cloudinary.com/scndit/images/w_480,h_240/f_auto,q_auto/v1664320975/live/Scandit_Passport_Feature_iPhoneX_373b3af4/Scandit_Passport_Feature_iPhoneX_373b3af4.jpg?_i=AA
The aspect ratio is not saved between the original image and the requested dimensions that are requested in the URL: w_480,h_240.
I would try to do c_fit,w_480 as an example to save the aspect ratio.
Another option is to use the responsive image feature to allow more flexibility.
Hope you find it useful.
Thanks,
Wissam
Thread Starter
Rhys
(@rjdusk)
Thanks @wissamcloudinary,
I’ve tried setting c_fit,w_960 into the “Additional image transformations” field within the WordPress plugin. The URL now becomes this:
https://res.cloudinary.com/scndit/images/w_960,h_480/c_fit,w_960/f_auto,q_auto/v1664320975/live/Scandit_Passport_Feature_iPhoneX_373b3af4/Scandit_Passport_Feature_iPhoneX_373b3af4.jpg?_i=AA
However the image is still stretched. The responsive image option is turned on too with these options set:
- Breakpoint distance: 280
- Max images: 5
- Image width limit: Max: 1440 Min: 320
Do the images need to be regenerated or something?
Thank you for any insights,
Rhys
Hi Rhys,
Thank you for the additional information.
As need the system report which contains some private information is it ok if you raise the ticket in our support portal:
https://support.cloudinary.com/hc/en-us/requests/new
Regards,
Wissam
Hi, I seem to have a similar problem with post thumbnails.
When the thumbnails are created we are specifying the size and that they should be cropped using default wordpress function. e.g.
add_image_size('medium-2', 704, 330, true);
add_image_size('thumb-2', 352, 165, true);
I would expect cloudinary to recognise the defined crop attribute and add a c_fill attribute to the the_post_thumbnail_url(). However it doesnt seem to do this.
Adding c_fill to global transformations doesnt work either as it is added into the wrong section of the URL – it comes after the size transformations..
Example bad URL:- https://res.cloudinary.com/we-clear-junk/images/w_704,h_330/f_auto,q_auto/v1682097079/wordpress_assets/uk-rubbish-guide_10503d1d39/uk-rubbish-guide_10503d1d39.jpg
With attempted global transformation workaround (not working):- https://res.cloudinary.com/we-clear-junk/images/w_704,h_330/c_fill/f_auto,q_auto/v1682097079/wordpress_assets/uk-rubbish-guide_10503d1d39/uk-rubbish-guide_10503d1d39.jpg
Expected URL for a definined post image with crop attribute set: – https://res.cloudinary.com/we-clear-junk/images/w_704,h_330,c_fill/f_auto,q_auto/v1682097079/wordpress_assets/uk-rubbish-guide_10503d1d39/uk-rubbish-guide_10503d1d39.jpg
Hi @ncompass,
Sorry for the late reply, we are facing some issues with getting notified for those replies.
In the next version of the plugin, we are adding some granularities to define transformations to assets so you will be able to add cropping to your images even after adding custom transformations programmatically.
Thanks for your patience.
Best,
Loic