diff --git a/Public/FeaturedImage/Infrastructure/Ui/FeaturedImageRenderer.php b/Public/FeaturedImage/Infrastructure/Ui/FeaturedImageRenderer.php index 023fe981..94c7ce8c 100644 --- a/Public/FeaturedImage/Infrastructure/Ui/FeaturedImageRenderer.php +++ b/Public/FeaturedImage/Infrastructure/Ui/FeaturedImageRenderer.php @@ -160,16 +160,18 @@ final class FeaturedImageRenderer implements RendererInterface $content = $data['content'] ?? []; $imageSize = $content['image_size'] ?? 'roi-featured-large'; - $lazyLoading = $content['lazy_loading'] ?? true; + $lazyLoading = $content['lazy_loading'] ?? false; // LCP: no lazy por defecto $linkToMedia = $content['link_to_media'] ?? false; $imgAttr = [ 'class' => 'img-fluid featured-image', 'alt' => get_the_title(), + 'fetchpriority' => 'high', // LCP optimization ]; if ($lazyLoading) { $imgAttr['loading'] = 'lazy'; + unset($imgAttr['fetchpriority']); // No fetchpriority si es lazy } $thumbnail = get_the_post_thumbnail(null, $imageSize, $imgAttr);