0

I recently imported custom posts and their attached images from one WP site to another. Each image exists in the media library, but inside each post's content, the link to the image is /wp-content/uploads/[name_of_image]-[width]x[height].jpg i.e. /wp-content/uploads/tree.jpg is being referred to as /wp-content/uploads/tree-700x394.jpg but that particular size for the image does not exist.

If I click on the broken image inside the post editor, the thumbnail for the image populates inside the editor and I can choose one of the sizes for the image that exists. If I update the image and the post, it fixes the issue, but I don't want to do that for each post and I think it would be really useful to understand how to fix something like this more efficiently.

I am wondering if there is a plugin which can either generate each size of the images found in posts, i.e. make `tree-700x394' or that can go through and just change all of the images to their original size.

Edit: I saw Why won't these imported images show up? with the same problem and tried regenerating thumbnails but it did not work.

1 Answer 1

0

I added a new thumbnail to the site by inserting add_image_size('project', 700, 9999 ); into functions.php because it seemed like all of the images from old posts were set to 700 width and an automatic height. Then I installed and ran Regenerate Thumbnails and it fixed the issue.

Your Answer

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

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