Page 1 of 1

How to Display an Image in Any Width and Height Without Ruining the Image Proportion?

Posted: 29 May 2024, 16:11
by Teros2
I am creating a custom template for my WordPress blog by myself as part of my project. But my progress is stuck with a problem. The problem is the distorted thumbnail images.

I need to display thumbnails of the last ten posts on the home page.

The thumbnail is like the following. The top part must contain an image with a width of 100% and a height of 200 pixels.

When I adjust the size of the image with the above rules, it disturbs the image proportion. How can I display the thumbnail image without ruining the proportion irrespective of its natural size?

Re: How to Display an Image in Any Width and Height Without Ruining the Image Proportion?

Posted: 05 Jun 2024, 19:30
by Yashika
Either use the correct image size proportion or set the image as cover.

Re: How to Display an Image in Any Width and Height Without Ruining the Image Proportion?

Posted: 08 Nov 2024, 19:12
by Sanal Mohan
Hello teros, you should use vector images.

Re: How to Display an Image in Any Width and Height Without Ruining the Image Proportion?

Posted: 13 Nov 2024, 22:27
by Random Topics