Avatar of Lev Seltzer
Lev Seltzer
Flag for Israel asked on

How to prevent picture cropping?

In WordPress on the site www.gatewaysonline.org I have noticed that some pictures are being cropped to fit a particular ratio. I want to figure out what is causing this and get it to stop, since my "featured images" do not display properly.

For example, on the page https://www.gatewaysonline.org/chosen-people-chosen-food/ the featured image should look like this:
Instead it is cropped and looks like this:

The theme designer helped me with the CSS code to get the height to match on the homepage, but that is not helping with the underlying problem that the image itself is cut off.

Thank you.

Avatar of undefined
Last Comment
Lev Seltzer

8/22/2022 - Mon
Scott Fell

Looking at the html code, I can see multiple versions of the image are being sent. Are you using any image plugins like smush?

Lev Seltzer

We have ShortPixel installed, but not Shmush. Full list is below:

David H.H.Lee

Hi Lev Seltzer,
By default WordPress generates three image sizes, for thumbnail, medium, and large.

You can stop WordPress from generating default image sizes by visiting Settings » Media in WordPress admin area. There you will see default image sizes predefined by WordPress. You need to set these sizes to 0 which will prevent WordPress from generating default image sizes when you upload a new image.

check this article how you can prevent wordpress from generating image sizes:

Please let us know if you still need any further support for this matter.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Alicia St Rose

View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Lev Seltzer

Thank you for your help. I have contacted the developer about changing the sizes of the images - or at least turning off the forced cropping.