I have been reading this morning about images uploaded via the Media Library in WordPress and I thought I had understood most of it. But there's something I'm confused about.

My understanding is that there are a range of default image sizes - thumbnail, medium, large - which are generated when you upload an image. The maximum dimensions are set in your Media / Settings page in the admin panel.

My "Large" sizes are set to the default 1024px wide and 1024px high.

Image sizes

I have an image which I uploaded that was well over this size. What I'm confused about is when I insert the image into a post and select the large image size - it gives 640px as the width of the image.

Image Details

The HTML image tag generated on the post is this:

<img class="alignnone wp-image-1718 size-large" src="http://www.mysiteurl.com/wp-content/uploads/2013/01/DSC_7543-1024x767.jpg" alt="DSC_7543" width="640" height="479" />

You can clearly see the image is actually 1024px by 767px from the filename - DSC_7543-1024x767.jpg - so why is it being scaled to 640px by 479px by the tags?

Thanks very much for any help!

1 Answer 1


640px is the content size set in your functions.php. Here is an example of the content width set in the bundled theme twentyfourteen in twentyfourteen/functions.php#L28

if ( ! isset( $content_width ) ) {
    $content_width = 474;

In this example, the image size will be 474 px.

The content size will be the size used when images are inserted as attachments in the content when creating posts


From the comments from the OP, to remove this restrictions, have a look at the 2 following posts

  • Thanks for the answer. I found this in my theme and just changed it to 740px to experiment. The images still had the 640px width until I edited the post and updated the images individually. This seems very labour-intensive! What is the point of $content_width if my CSS sets max-width of an image to be 100% anyway? It seems restrictive. If I comment that part of my functions.php out will it remove the restriction?
    – Sarah
    Commented Aug 24, 2014 at 13:54
  • For reference to anyone else reading this - see this article wycks.wordpress.com/2013/02/14/… and this question wordpress.stackexchange.com/questions/86950/…
    – Sarah
    Commented Aug 24, 2014 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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