ChannelThumbnail fixes #6075

Merged
infinite-persistence merged 4 commits from ip/reenable-channel-thumbnail-optimization into master 2021-05-17 21:51:21 +02:00

4 commits

Author SHA1 Message Date
infinite-persistence
faefb4c59c
ChannelThumbnail: fix lazy-loading
- Closes 6066: Revisit lazy-loading Channel thumbnails
- Properly fixes 5933: Thumbnail lazy-load causes ChannelSelector icon to not update.
    - Add effect-dependency on `channelThumbnail` and `thumbError`.
- Really perform the lazy-loading now.
    - `data-src` was not used, so it wasn't actually lazy loading previously.
2021-05-17 15:42:18 +08:00
infinite-persistence
117fcc43d0
Restore channel selector
This reverts b5cc0bb42d
2021-05-17 15:28:13 +08:00
infinite-persistence
2cc42477be
ChannelThumbnail: disable optimization in Channel Page and for GIFs
## Issue
5564: Don't use optimized URLs on channel pages (profile/banner)

## Notes
This is not the best/full solution yet, but it is better than what we have to today (one step in the right direction).

Optimized channel thumbnail size is currently hardcoded to a lowest common denominator.
- Pro(s):
  - For images used in multiple places (different sizes) in a page, the total time needed to get the optimized version for each size is too much. Also, the optimizer seems to increase the size of the image in some cases. So, getting 1 image and re-using it is faster for this scenario.
  - Simpler code (no need to mount first -> get dimension -> load image)
- Cons:
  - We aren't fully optimizing the size, so not really addressing Core Web Vitals score problem.
    - e.g. in the front page, we could have used a smaller image for the channel thumbnails.
  - We haven't address the problem with large screen sizes.
2021-05-17 11:16:51 +08:00
infinite-persistence
289ed12f0f
Restore "use cdn for channel thumbnails"
This reverts commit e7adc607fa.
2021-05-17 09:12:37 +08:00