The Divi Theme gallery module has a grid view which shows thumbnails of the images in the gallery. Sometimes the thumbnails will appear distorted, as small images are stretched to fill the thumbnail area. To prevent the image stretching, we can use the following CSS:
.et_pb_gallery_image img { width: auto !important; height: auto !important; position: relative; left: 50% !important; -webkit-transform: translateX(-50%); -ms-transform: translateX(-50%); transform: translateX(-50%); }
This removes the minimum height and width setting which was causing the stretching, and centers the image in the thumbnail area.
Thank you as I use divi theme for most clients.
Ohmygod. THANK YOU. I was pulling my hair out. It was not pretty.
Thank you sooooooo much!!!
Where do you implement these lines of code?
Hi Ian, there are a few options. Here's my post on adding CSS to the Divi Theme.