That has worked, thank you very much.
It would be good to somehow keep the data-width functionality in there as now the LCP for mobile is actually worse than before as it’s loading the full-size image.
Is there a way to have smaller size images load for mobile like the original “data-widths” provided?