-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
How to show alternate image if source image is not found? #2335
Comments
@evivz To clarify: Are you asking for a way to show a fallback (backup alternate image) in the case that the src specified by amp-img is not found (i.e. 404)? Is there some reason why it cannot be reliably known whether the image is available? |
I am serving images from third party services and many times they are dead. Before I could update their replacement in my server many people visit my website. I want to serve them alternate image temporarily. |
@rudygalfi @evivz @sriramkrish85 We can consider
It doesn't only have to be image as a fallback - it could be an SVG or even a basic DIV with text. If this is agreeable, we can explore this option. |
Yes this will work. |
Any updates by when this feature/request will be added? |
i'll take over this one. should be able to start on it late tomorrow or thursday. |
Thanks, @erwinmombay . Just for posterity: for the complete solution this issue will be blocked on #2261. |
I am not able to get this fallback.. how should i use this fallback feature? |
@kishanj918 so it is currently in opt in canary and a user will have to turn on "dev channel" in cdn.ampproject.org/experiments.html do try it out if it solves your problem. if there are no issues it will be released to production by Thursday next week |
@erwinmombay That worked. Thanks |
I Am using amp-img tag. I won't implement above functionality. Can you please help?
The text was updated successfully, but these errors were encountered: