Regenerating HTML code
-
I’ve switched themes from a custom theme to 2017 theme. As part of this transition, I also want to remove alot of unnecessary image sizes that are taking up alot of room on my server.
In order to do this, I removed and regenerated thumbnails. However, this breaks ALL of my existing posts. I want to just have these image sizes (in pixel widths):
525w, 375w,768w and 620w for compatabilityHowever the srcset for
tag has these additional sizes:
…/uploads/2014/08/01-20140813-L1004852-980×654.jpg 980w,
…/uploads/2014/08/01-20140813-L1004852-780×520.jpg 780w,
…/uploads/2014/08/01-20140813-L1004852-300×200.jpg 300w,
…/uploads/2014/08/01-20140813-L1004852-175×116.jpg 175w”After doing some research, I found these notes:
which states:
Note that for compatibility with existing markup, neither srcset nor sizes are added or modified if they already exist in content HTML.But, this is a problem for me, as I want to get rid of these images, but as they are being included in the srcset I can’t for existing posts….
Ideally, I would like to tell wordpress to regenerate all of the HTML pages, using the current set of image sizes. I have actually fixed any minor recompatability problems, and I would rather do this than have some kind of runtime modification of the HTML code to filter out unwanted images.
Currently, I’m regenerating the complete set of thumbnails for all of these sizes, as I can’t find any other solution at this point.
Thanks
William
(PS – if this is moderated and I’ve posted in the wrong forum, can you please email with details about where I should post! Thanks! 🙂
The topic ‘Regenerating HTML code’ is closed to new replies.