Posted March 20Mar 20 Hi, I am trying to fix Largest contentful paint element. Where to edit Wallpaper Carousel Widget template?
March 20Mar 20 Community Expert You cannot directly edit templates on version 5. Please could you provide more information on exactly what you are trying to do?
March 20Mar 20 Author I want to add a few attributes to the <img> in Images WidgetAttributes: width, height and fetchpriority
March 20Mar 20 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)
March 21Mar 21 Author I will try that way. Where to access the default template? (it was easier on the V4)
March 21Mar 21 Author I tried this and it worked.document.addEventListener('DOMContentLoaded', function() { document.querySelectorAll('img').forEach(img => { img.setAttribute('fetchpriority', 'high'); }); });
March 21Mar 21 Community Expert That code will update all images, not just the ones inside the widget.
March 24Mar 24 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.