webp-in-css
webp-in-css copied to clipboard
question: does this plugin assume webp image exist?
Hello, does this plugin check if a webp version of the image exist or not? It's more convenient than creating the declarations automatically. There is another plugin that checks for the existence of the image (postcss-retina-bg-img).
I would love to add that feature if it doesn't exist.
It doesn't check it, but we can add it.
What we will do in this case? Show error?
It can just show a warning or an info that a webp version does not exist and simply ignore the declaration. The benefit of that is that you shift the purpose of the package to be solely adding webp only if it exist. The conversion shouldn't bother us and left to the author. It can manually generate it, generate it using a gulp plugin or whatever the author wants.
Sure. Here is PostCSS for warnings http://api.postcss.org/Node.html#warn
I will wait for PR.
Awesome, will start working on it.
Let’s keep issue open until we will fix the problem (just as ToDo note)
Is this still relevant? I'd like to work on it if it's still needed
@AhmedFat7y yeap, we still need to fix it
@AhmedFat7y It's yours, my apologies I didn't have time for it
This is still not implemented, can I try?
I'm thinking of taking the value from inside url() at the background, background-image, etc. I don’t know yet how to determine the existence of pictures, maybe it has already been implemented somewhere?
I am trying to find a similar problem