axe312ger / sqip

"SQIP" (pronounced \skwɪb\ like the non-magical folk of magical descent) is a SVG-based LQIP technique.
http://axe312ger.github.io/sqip
The Unlicense
3.37k stars 82 forks source link

Switch from `feGaussianBlur` to CSS `filter:blur` #335

Open xerc opened 9 months ago

xerc commented 9 months ago

<g filter="url(#prefix__a)" svg-feGaussianBlur

<g filter="blur(12px)" css-filter-blur

ref. https://axe312ger.github.io/sqip/processed/charles-550068-unsplash-sqip.svg

axe312ger commented 8 months ago

Thank you for the suggest, css blur looks better but:

  1. browser support is questionable (at least it was a few years ago)
  2. it (was) much worse in performance as the svg blur

I am happy to give an option so the user can decide which blur to choose. Maybe we can do some rendering performance testing as well?

xerc commented 8 months ago
1. browser support is questionable (at least it was a few years ago)

true ; not @ IE

2. it (was) much worse in performance as the svg blur

could find any benchmarks from 2k+

I am happy to give an option so the user can decide which blur to choose.

good idea

Maybe we can do some rendering performance testing as well?

@ chromium [120.0.6092.0] filter:blur seems faster (3 reloads)

Bildschirmfoto 2024-02-19 um 20 23 19 Bildschirmfoto 2024-02-19 um 20 23 06

axe312ger commented 8 months ago

For reference, here is the browser support:

axe312ger commented 8 months ago

Honestly, support is the same (today!) and IE ~doesnt support either blur technique~ is not relevant anymore. Luckily its 2024.

axe312ger commented 8 months ago

It would be really cool if we could change our demo, or make another sub page for each blur with a lot of example images. Then we can render each page multiple times in a controlled environment (some CI) and compare the rendering results.

Based on this, we can give the users some details about the impact on which blur they choose, plus maybe switch to the css blur filter as default