If I view a post in desktop view my images appear normally. However, if I switch to mobile view, the featured image loses its original aspect ratio and is replaced with a square image. This image isn’t resized, it’s just hard cropped. As my images are all books, I need to retain the portrait rectangular aspect ratio to stop the bottom of the image from getting chopped off.
Where can I change the handling for images on mobile to retain their normal aspect ratio?
PS: The underlying thumbnails should all be fine as my WP media settings ensure they are sized proportionally, rather than to exact dimensions.
Hey hybridE4t,
Thank you for using Enfold.
This css code should help.
.single-post .single-small.with-slider .small-preview {
width: auto;
height: auto;
}
The width and height is set to 180x180px by default.
Best regards,
Ismael
Thanks. I deleted the width line (otherwise the image is huge) but kept height: auto; and this resolved my issue.
All sorted thanks!
Hi,
Glad Ismael could help! :)
For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/
If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)
Best regards,
Yigit