Skip to content

Issue 55: Preloading responsive images - #75

Open
rpasillas wants to merge 10 commits into
productionfrom
feature/issue-55/preload
Open

Issue 55: Preloading responsive images#75
rpasillas wants to merge 10 commits into
productionfrom
feature/issue-55/preload

Conversation

@rpasillas

@rpasillas rpasillas commented Jul 31, 2026

Copy link
Copy Markdown

Summary

Example:

am_preload(
	[
		'handle'        => 'preload-wolf',
		'src'           => 'wolf.jpg',
		'version'       => '1.0.0',
		'as'            => 'image'
		'mime_type'     => 'image/jpeg',
		'imagesrcset'   => 'wolf_400px.jpg 400w, wolf_800px.jpg 800w, wolf_1600px.jpg 1600w',
		'imagesizes'    => '50vw',
		'fetchpriority' => 'high',
	]
);

Testing Instructions

  1. Call the am_preload() like the example above.
  2. Ensure you see the <link> in the head and that it meets the criteria in this article: https://web.dev/articles/preload-responsive-images

Checklist

  • I have tested these changes locally.
  • I have updated documentation as needed.
  • I have added relevant tests if applicable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant