Archived topic
Featured Images from Old Posts are Broken
11 replies · Started by Viraj on November 25, 2021
Hello Team,
Featured images from old posts are not showing up. When I checked the image source code for broken images, I noticed that it added dimension at the end of the URL. If I remove those dimensions, images load perfectly.
For example - src="https://www.siteurl.com/wp-content/uploads/XXXX/XX/imagename-400x250.jpg"
If I take out the "-400x250" part, it works perfectly. Also, the URL structures for old and new featured images are different. Kindly guide.
Hi there,
In Customizer > Layout > Blog --> Featured Images >>> Archives. What Attachment size do you have selected ?
Hi David,
The settings are as shown in the image - https://ibb.co/Fg16LvN
Ok - so it looks like you're older posts don't have various src-set thumbnails.
Try the Regenerating them with this plugin:
Hi David,
Tried regenerating thumbnails, but the URL structure didn't change. Is there any other solution?
Hmmm... what i don't understand is where is the 400×250 values coming from ? Did you have any custom thumbnail sizes ?
I don't recall having any custom sizes for thumbnails. However, we had installed Smush wordpress plugin a long back but I am not sure if it altered anything.
When you ran the regenerate thumbnails plugin - did it report how may images it updated?
Yes, it regenerated all 628 thumbnails - https://ibb.co/BzRMLYn
Hmmm.... in Customizer > Layout > Blog, can you temporarily change the Media Attachment size to Full, and remove the width and height attributes. Then check the img src.
Dang! That did the trick. I have now resized all the thumbnails using regenerate thumbnails plugin to the size I want.
Thank you so much David! You have been of great help 😊
Awesome - glad to hear that!