Optimizing LCP images with Drupal

Recently, I've released an alpha version of Responsive Image Preloadthis link leads to an external website that can help optimize the LCP web vital when the element happens to be an image.

The module will automatically generate a set of preloadthis link leads to an external website links that are tailored to a responsive image style. This means that the proper image will "cut to the head of the line" when being queued for download after the document is received. The module works by adding a third party setting, "Generate preloads" to the Responsive Image field formatter plugin that the core provides. If any such plugin is configured to generate preloads, then a field preprocess hook does its magic to generate a set of preload elements.

I encourage the reader to check out the documentationthis link leads to an external website on drupal.orgthis link leads to an external website.