I've built this responsive site on WordPress and got a little curious as to how I can set the post thumbnails in percentages. Any help would be much appreciated.


This is not possible, images must have real absolute sizes :)

A post thumbnail is essentially a different sized version of the image. While you can calculate how much for example 70% of 1024 is, and genereate a ~700px wide image, you cannot do this for each of your visitors. It would kill your host's CPU...

The closest thing you can do is to browser-resize images to fit their container:

  max-width: 100%;
  height: auto;
  • That's what I'm doing now, I was just really curious to see if that could be done with WordPress or not. Thanks for confirming this for me :) – Jamal_Jakson Apr 11 '12 at 13:01

Follow up to @OneTrickPony A:

You could also use a background image, resize the container accordingly and then add background-size: contain;.

  • Yeah, I thought of that but I wanted to see if doing it this way would possible. – Jamal_Jakson Apr 11 '12 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.