I have twitter block enable on few website. (It's a really nice module)
I start to optimise a website and turn it into PWA - I manage to get more than 95/100 with Google Lighthouse Audit on all categories.
But when I run lighthouse audit on a page where twitter block is present, I get only 57/100 on the performance section and the load time increase by around 7s (comparing with the same page without the twitter block)
When I check the suggession given, I saw that the main area of improvment is "Serve images in next-gen formats :
Image formats like JPEG 2000, JPEG XR, and WebP often provide better compression than PNG or JPEG, which means faster downloads and less data consumption. "
I saw that image are loaded in PNG format with a width of 900px and then resized to 200px with css. All my image URL serve by Third Party look like :
https://pbs.twimg.com/media/[unique media code]?format=png&name=900x900
But also on "Remove unused CSS" with a potential saving of 60% on the timeline.x.light.ltr.css file
In the twitter Block configuration page I can only reduce the number of element to load (Tweet limit : 20 items for me) to increase the page loading time. But it's not a nice solution.
Do you know if I can load image in another format, or if I can load them in a more appropriate size like 200x200?
Is there a way to put the JS script in the bottom of the DOM instead of a the end of the tag ?
Another question more relative to PWA, I would like to know if someone already look in caching image from twitter feed.
Thanks,