jscher2000 / dont-accept-webp

Don't "Accept" image/webP - extension for Firefox
Mozilla Public License 2.0
82 stars 0 forks source link

How would I make a site which respects this addon? #11

Open ranidspace opened 9 months ago

ranidspace commented 9 months ago

Sorry this isnt an issue with the addon itself, feel free to close this.

I have a website, and i have a directory of images, both in webp and png formats. I have tried using a "picture" element with both a webp and png element inside and it still, even with the addon only loads the webp. What could I do to make it obey the header?

jscher2000 commented 8 months ago

Hi Audrey, Firefox generally loads <picture> sources in order. I think in order to make it easier to copy the image, I would need to remove the webP source tag so that Firefox loads the next format. Maybe I can make that a right-click menu option (I don't want to change every page automatically).

krystian3w commented 8 months ago

In uBo may works:

*##^picture source[srcset][type*="webp" i]:not(:only-child)

If we want cover almost any language (HTML filtering excepts some encoding from support).

For AdGuard maybe:

$$picture source[srcset][type="webp"]

but that rule may fail at page with enabled generichide (tribe to disable almost all generic rules - uBo some filters forces in declarative mode so generichide is ignored)