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

It is a Webmaster forum to discuss website promotion, CMS management, Search Engine discussions, AdSense, etc.
Post Reply
Teros2
Posts: 1
Joined: 29 May 2024, 16:02

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

Post 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?
Yashika
Standard User
Posts: 79
Joined: 16 Oct 2023, 11:29
Location: Noida Sector 85

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

Post by Yashika »

Either use the correct image size proportion or set the image as cover.
Sanal Mohan
Standard User
Posts: 39
Joined: 05 Nov 2024, 22:44
Location: Bengaluru

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

Post by Sanal Mohan »

Hello teros, you should use vector images.
Post Reply