Jump to content

Featured Replies

Posted

Hi, I am trying to fix Largest contentful paint element. Where to edit Wallpaper Carousel Widget template?

  • Community Expert

You cannot directly edit templates on version 5. Please could you provide more information on exactly what you are trying to do?

  • Author

I want to add a few attributes to the <img> in Images Widget

Attributes: width, height and fetchpriority

  • Community Expert

You would indeed need modification for that. Maybe something like using javascript to replace that element with what you need (certainly not my area of expertise)

  • Author

I will try that way. Where to access the default template? (it was easier on the V4)

  • Author

I tried this and it worked.

document.addEventListener('DOMContentLoaded', function() {
    document.querySelectorAll('img').forEach(img => {
        img.setAttribute('fetchpriority', 'high');
    });
});
  • Community Expert

That code will update all images, not just the ones inside the widget.

  • Author
On 3/21/2025 at 8:02 PM, teraßyte said:

That code will update all images, not just the ones inside the widget.

Yes, you are correct. One can customize it further for whichever image they want.

Recently Browsing 0

  • No registered users viewing this page.