Why does the add_image_size() function not create a copy of the thumbnail image in wordpress?

I have uploaded a photo in WordPress. I am trying to post a thumbnail of the image using a predetermined width while constraining the height proportionally.

In functions.js:

Read More
add_image_size('width-130', 130, 0, false);

On the page that outputs the thumbnail:

the_post_thumbnail('width-130');

According to the WordPress docs(http://codex.wordpress.org/Function_Reference/add_image_size), it says:

WordPress will create a copy of the post thumbnail with the specified
dimensions when you upload a new thumbnail.

Currently it is outputting the full thumbnail image with a width attribute of 130. This still requires the full size image to load, which is not what I want. I would like for WordPress to create an actual copy of the post thumbnail with the correct dimensions, and not just to set the width attribute. How can I achieve this?

Related posts

Leave a Reply

3 comments

  1. I discovered my mistake.

    Since I had not re-uploaded the image file, it was still trying to access the full size image which was the assigned image for that post, while adding the width attribute. Once I re-uploaded the image, the add_image_size() function is now actually creating a copy of the thumbnail with the correct dimensions.

    I apologize for asking this question. If the community wants, I can close it but I figure it might be good reference for WordPress newbies such as myself.