fix(common): Add fetchpriority to ngOptimizedImage preloads (#48010)

Add fetchpriority='high' to ngOptimizedImage preloads to so their priority matches the priority of the image element itself

PR Close #48010
This commit is contained in:
Alex Castle
2022-11-09 10:20:50 -08:00
committed by Jessica Janiuk
parent 4a05cfdfb2
commit 1d1e33e8d0
3 changed files with 3 additions and 0 deletions
@@ -65,6 +65,7 @@ export class PreloadLinkCreator {
renderer.setAttribute(preload, 'as', 'image');
renderer.setAttribute(preload, 'href', src);
renderer.setAttribute(preload, 'rel', 'preload');
renderer.setAttribute(preload, 'fetchpriority', 'high');
if (sizes) {
renderer.setAttribute(preload, 'imageSizes', sizes);