amp-bind doesn't change img src
See original GitHub issueIssue first seen here https://github.com/ampproject/amp-by-example/issues/586
It appears that changing the src
of an amp-img
does not update the src
of the img
.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to change amp-img src? - javascript - Stack Overflow
I want to change the img src through JavaScript and it does not seem to work. HTML: <amp-img id="logo-cat" src="http/images.." ...
Read more >amp-img not rendering a new image as src attribute changes ...
This problem is only reproducible from AMPs that are served from google cache. when amp-img src attribute bound to amp-state changes, the new ......
Read more >Example: <amp-img> - amp.dev
You can use amp-bind to dynamically change the src URL of an amp-img . Remember to also change the alt if the content/meaning...
Read more >4 tricks for developing with the AMP framework
The first thing we will have to do is include the amp-bind component within ... Next, we will modify our button so that...
Read more >How to create an image element dynamically using JavaScript
Given an HTML element and the task is to create an <img> element and ... How to change/update image size dynamically using amp-bind...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Most likely due to stale AMP runtime in SW cache. E.g. My cached version was 1482359659944 which lacked the
mutatedAttributesCallback
method. Can’t repro after clearing cache.Please reopen if still reproducible after clearing cache.
/cc @sebastianbenz Perhaps amp-by-example should change caching strategy from
cacheFirst
tofastest
to avoid these types of problems for new/experimental components?Verified fixed in new canary 1486754279878.