Is the Placeholder generator generating an SVG or a jpeg? #27
-
I looked into the source code of your blade files and I see that the placeholder might be a jpeg. Is that true? or is it an SVG? Because an SVG would be better as it can scale and always keep the same quality regardless of size or screen |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The converter only generates a base64 small blurred image. This is the same method used by Spatie. They actually embed this tiny image inside an SVG (https://github.com/spatie/laravel-medialibrary/blob/45e43aebc8ee89589eaa6439cb38fff8e039f618/resources/views/placeholderSvg.blade.php), but it actually does not make it a real SVG. It’s just a wrapper. You can create an svg just like they do if you want but it will not make it "scalable" |
Beta Was this translation helpful? Give feedback.
The converter only generates a base64 small blurred image. This is the same method used by Spatie. They actually embed this tiny image inside an SVG (https://github.com/spatie/laravel-medialibrary/blob/45e43aebc8ee89589eaa6439cb38fff8e039f618/resources/views/placeholderSvg.blade.php), but it actually does not make it a real SVG. It’s just a wrapper.
You can create an svg just like they do if you want but it will not make it "scalable"