Commit graph

2 commits

Author SHA1 Message Date
infinite-persistence 6b2548cc49
Fix channel-selector thumbnail not updating
Recently changed to `<OptimizedImg>`, which was assuming the `src` never changes.

dejavu ... we also hit this issue when implementing the `IntersectionObserver` lazy-loading.
2021-07-21 16:38:54 +08:00
infinite-persistence 68432eef26
OptimizedImage - wrapper for CDN-optimized image
Objective:
- Get appropriately sized images to improve performance and Core Vitals score.
- Ensure images using "objectFit=cover" doesn't get stretched out if the source is large enough.
- Peg to 100px increments for better caching.

Notes:
- Skip images hosted in '/public'. If we really want to optimize it, then we'll need to provide the full path in the code, otherwise CDN lookup will fail.
2021-07-20 16:21:50 +08:00