WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to WP and am not sure how to re-size a picture.

I want to scale down the pic of the guy on this page: http://www.millermusiclessons.com/

If you view the page source and find the source of the picture, it already has height and width attributes assigned to it. When I edit these attributes in Notepad++ and re-upload them to my server the page still looks the same (yes I am clearing my cache) How can I change these attributes? Any edits I make to to "index.php" never show up, but edits to "style.php" seem to always work.


share|improve this question
if your theme has a home.php or page.php you'd want to modify this not index.php. See theme hierarchy codex.wordpress.org/Template_Hierarchy – BandonRandon Nov 20 '11 at 18:45
up vote 0 down vote accepted
#sidebar_img img {
    width: 250px !important;
    height: auto;

#sidebar_img {
    text-align: center;

use this css.. change 250px with whatever you want.

share|improve this answer
thanks, that made it smaller. How can I center it now, though? – cmorris1441 Nov 20 '11 at 20:06
i added #sidebar_img change.. replace that width:300px definition with this one – Ünsal Korkmaz Nov 20 '11 at 22:01

You should use WordPress's feature called Post Thumbnails. Read more about it, it should do it.

share|improve this answer
If you use Firebug and go to the site linked to, you should notice that the image is placed in the text widget: div .textwidget – Jeremy Jared Nov 21 '11 at 0:29

You can change them using css, but that isn't good practice since the server still loads the full size image. It appears this image is placed using the text-widget. You should be able to go to Appearance>Widgets and change the image dimensions to match the size of the actual image you uploaded. Be sure you have the correct URL for the newly uploaded image.

share|improve this answer
I went there and it lists all my widgets, but I don't see a way to change the image size. – cmorris1441 Nov 20 '11 at 20:08
never mind i added this and it works great! thanks display: block; margin-left: auto; margin-right: auto – cmorris1441 Nov 20 '11 at 20:11

I would recommend using something like this (most themes already include it by default) to resize your images on the fly...


It's fairly easy to setup and use, and includes a ton of documentation.

share|improve this answer
TimThumb is basically out of date with WordPress' current thumbnail options. – AndrettiMilas Nov 20 '11 at 21:06
I think you're thinking of the original timthumb... this is the revised version which has been optimized for WordPress by a different author. – Nero_DCLXVI Nov 20 '11 at 21:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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