Is there a way to stop cropping images that are displayed in the lightbox?
All images are cropped the same way, which is fine because it results in a very clean look. But I’d prefer if the image that appears in the lightbox (when you click on an image in the listings images) would not be cropped.
The user then could upload landscape images, portrait images and squared images. For the preview the images are all cropped resulting in the same width and height, but when a visitor clicks on an image to open the lightbox the visitor would see the whole images rather than the cropped version.
Hi,
It’s possible, but this would require overriding this template part hivepress/listing-images.php at master · hivepress/hivepress · GitHub We use the “large” image size by default (registered by WordPress), it’s set to 1024px max (eighter height or width), I recommend keeping it because larger images may affect the performance.
Please try adjusting this size in Settings/Media, e.g. set height to 9999px then only the width will be affected, the height will be automatic depending on the aspect ration (changes apply to newly uploaded images only) Screenshot by Lightshot
I did that and it worked, however I noticed some behavior that I don’t like and I need it to be fixed. My Settings/Media are the default settings besides the little change that you just told me.
I uploaded an image which is 746x1730px. I noticed that it gets cropped differently (with different dimensions) then larger images. It’s because of the “Landscape size (large)” setting which is 800x600px.
Unfortunately there’s no way to do this in the WordPress image uploader, if smaller images are uploaded then WordPress leaves images “as is” #23713 (Image editor: Remove help text about unsupported image upscaling) – WordPress Trac Please consider keeping the 800x600 dimensions for the Landscape (Large) size, most of the photos nowadays are significantly larger in any case.