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

Fallback image #105

Open
niklasxulls opened this issue Nov 26, 2022 · 0 comments
Open

Fallback image #105

niklasxulls opened this issue Nov 26, 2022 · 0 comments

Comments

@niklasxulls
Copy link

A very important thing that this package is missing, is the option to set a placeholder picture/a fallback background-image, since the main picture may not load. The problem is, that you just url encode e.g the big property on the image and put it inside of background-image: url("...."), hence it's not possible to add a fallback by myself. Usually this would look like background-image: url("https://..."), url("/assets/images/placeholder.png").

It would be great if you could add such an option for a placeholder picture, or - this seems easier - allow the consumer of this package to define the value of background-image itself. Therefore you would just check if the provided value for "big" (example) contains the string url("... if so, you don't process the provided value any further, elsewise you serialize it and wrap it with url("... itself, as it is the case currently.

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

1 participant