Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: does this plugin assume webp image exist? #5

Open
ahmadalfy opened this issue May 29, 2019 · 9 comments
Open

question: does this plugin assume webp image exist? #5

ahmadalfy opened this issue May 29, 2019 · 9 comments

Comments

@ahmadalfy
Copy link

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.

@ai
Copy link
Owner

ai commented May 29, 2019

It doesn't check it, but we can add it.

What we will do in this case? Show error?

@ahmadalfy
Copy link
Author

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.

@ai
Copy link
Owner

ai commented May 29, 2019

Sure. Here is PostCSS for warnings http://api.postcss.org/Node.html#warn

I will wait for PR.

@ahmadalfy
Copy link
Author

Awesome, will start working on it.

@ai ai reopened this May 29, 2019
@ai
Copy link
Owner

ai commented May 29, 2019

Let’s keep issue open until we will fix the problem (just as ToDo note)

@AhmedFat7y
Copy link

Is this still relevant?
I'd like to work on it if it's still needed

@ai
Copy link
Owner

ai commented May 3, 2020

@AhmedFat7y yeap, we still need to fix it

@ahmadalfy
Copy link
Author

@AhmedFat7y It's yours, my apologies I didn't have time for it

@boldevelop
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants