[DON'T MERGE] Try using WebP images in marker description #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(追記)結論: coderdojo.jp 側が WebP 画像に対して text/plain の Content-Type で返していたのが原因でした 😂😂😂
また Content-Type が
text/plainとなっているのは Rails ではなく Heroku 側の仕様のようで、Rails ではなく Static Site としてデプロイされている別サイトでも同様の現象が確認できました。速度的にも負荷的にも DojoMap のリポジトリ内で画像をキャッシュした方が良さそうなので、今回は画像をキャッシュする方向で対応します!🛠💨✨ → #9同じドメインでも別 URL (localhost 含む)からだと WebP は読み込めない...? 🤔💭
NOTE: 各 Dojo のロゴ画像は現在
*.pngと*.webpの2つが用意されている: https://github.com/coderdojo-japan/coderdojo.jp/tree/main/public/img/dojoshttps://coderdojo.jp/img/dojos/maebashi.webp
↑ GitHub ではそもそもサポートされてなかった 😂
https://coderdojo.jp/img/dojos/maebashi.png
分かったこと: 外部の WebP 画像読み込みは色々設定が必要? 内部からなら WebP 画像は読み込める e92aaa0
追記: こういう書き方でブラウザに適切な読み込み方法を対応する方法もあるっぽい 👀 ✅ けどいずれにせよコレだけでは別ドメインにある画像は読み込めないっぽかった 😂