How to auto resizing images to fit max width in post page?

Posted in: Newspaper
Post count: 10

Hi,

For example, my image is 640×350, but I know the max width is 696. Then how to auto change my image width to fit 696px? If I can do that, look very beautiful.

Thank you.

Post count: 7909

Hi,

All the featured images are cropped to different sizes to fit on our modules but also to fit in the post templates, please check this section and see that also for post pages(some of them) the uploaded images are cropped – http://screencast.com/t/liUzod9X
So for example if you use a small image size it will not be resized, but you can try this custom css in Theme Panel > Custom Css for default post style – http://screencast.com/t/DWb7ZEMsoOP

.td-post-template-default .td-post-featured-image img {
width: 100% !important;
}

Thanks!

Post count: 10

Hi Alin,

Thanks for your reply, but i still need your help

  • This reply was modified 10 years by suipowers.
Post count: 10

Hi Alin,

I add the Css on my theme cpanel, but still don’t change anythings.

http://www.screencast.com/t/XBoMo7BX

And my site is: http://weekonweek.com/

Post count: 22421

Hello,
I have inspected a few posts on your site and every image that has a big enough size is croped to the maximum of 696 width.
The code Alin provided works only on the default template. If you use other post templates it will not apply.
You can use the code without the first part so it will apply on all templates:
.td-post-featured-image img {
width: 100% !important;
}

Let us know if it still does not work and if not please provide an example of a post and an image that does not get cropped properly and a url pointing to it.
Thank you!

Post count: 10
Post count: 10

Hi bro, thank you, I have got that, and add the code:

.td-post-content img {
width: 100% !important;
}

Thank you.

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.