Existing images in posts not rendering after bulk optimization
-
I’m using WordPress with the classic editor and have many posts with images added into the content editor. After bulk optimizing the media gallery and toggling on the “Use picture tags” option, the images within these posts aren’t rendering and are showing up as broken links. However, they do render properly if I remove the image from the content editor and add it back in, but with many posts this can take an absurd amount of time.
Here’s an example of a working webp image in one of my posts (I took out the URLs for shortness/privacy):
<picture loading="lazy" class="alignnone wp-image-2057 size-full"> <source type="image/webp" srcset="[insert url here] 936w, [insert url here] 300w, [insert url here] 768w"> <img loading="lazy" src="[insert url here]" alt="" width="936" height="484" srcset="[insert url here] 936w, [insert url here] 300w, [insert url here] 768w"> </picture>And here’s an example of another image (in the same post) that isn’t rendering:
<picture> <source type="image/webp" srcset="[insert url here]"> <img src="[insert url here]"> </picture>The first image only worked after I removed it from the content & added it back in. The second image lacks the proper srcset and other image attributes.
Just to reiterate, posts that contained images in the content/body prior to bulk optimization are now failing to render images after bulk optimization.
Can someone help me figure out what’s going on here?
The topic ‘Existing images in posts not rendering after bulk optimization’ is closed to new replies.