4 ms·
One thing I learned about responsive images - <img> elements with a srcset attribute - while developing my JS canvas library is that if you're relying on those
by rikroots 5y ago
One thing I learned about responsive images - <img> elements with a srcset attribute - while developing my JS canvas library is that if you're relying on those <img> elements to as the source for your ctx.drawImage() calls then the whole thing blows up in unexpected ways when the user changes their browser's size.
- rikroots 5y agoIn case anyone's interested, this is how I solved the problem so my library can work with responsive images: https://scrawl-v8.rikweb.org.uk/learn/second-lesson https://scrawl-v8.rikweb.org.uk/learn/second-lesson