image_fetchpriority
The Image Fetchpriority module enhances Drupal's core image formatters by allowing site builders to add the fetchpriority attribute directly from the UI. This is crucial for optimizing Core Web Vitals, specifically the Largest Contentful Paint (LCP), by hinting to the browser which images should be loaded with higher or lower priority.
Features
- Adds a
fetchprioritysetting to the standard Image formatter. - Supports standard Image and Responsive Image formatters natively.
- Options include: High, Low, and Auto (default).
- Seamlessly integrates into the existing "Image loading" fieldset in the Manage Display settings.
Post-Installation
Once installed, navigate to the "Manage Display" tab of any entity (like a Content Type) that uses an Image field. Click on the gear icon to configure the formatter settings, and you will see a new "Fetch priority" dropdown. Select your desired priority (High, Low, or Auto) and save.
Additional Requirements
No additional requirements. This module only depends on Drupal core's Image module.
Similar projects
While there are other performance-related modules, this module focuses specifically on providing a native fetchpriority HTML attribute integration within core image formatters, extending core functionality rather than replacing it with custom formatter plugins.
🤖 Note of honesty: This module was created with AI assistance (vibecoded), but has undergone thorough human review, testing, and architectural validation to ensure it meets Drupal coding standards and best practices.