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.
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.
Share Improve this question edited Jan 30, 2020 at 6:28 Sards asked Jan 30, 2020 at 4:14 SardsSards 12 bronze badges1 Answer
Reset to default 0I 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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744790733a4593897.html
评论列表(0条)