Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ブランチプレビュー環境で画像へのアクセスがカバー画像jpgのアクセスがトップへのrewriteとなる #401

Open
gentksb opened this issue Sep 25, 2024 · 5 comments

Comments

@gentksb
Copy link
Owner

gentksb commented Sep 25, 2024

事象

ブランチプレビュー環境で、meta:imageに設定しているjpg画像にアクセスすると、トップ画面が表示される

影響

[[slug]]/twitter-og.pngを生成する処理で正しい画像が取得できずエラーとなる。本番環境でしか動作確認できない

原因

passthroughImageServiceがwebpのみレンダリングするため

@gentksb
Copy link
Owner Author

gentksb commented Sep 25, 2024

本番環境では正常動作する

@gentksb
Copy link
Owner Author

gentksb commented Sep 25, 2024

アップロードされているアセット内にjpgファイルが存在していない

@gentksb
Copy link
Owner Author

gentksb commented Sep 25, 2024

本番は生のjpgとCloudflare image resizingなので問題ない。ブランチプレビューは画像をpassthroughImageServiceでスルーしているため何か起きている?
ローカルのキャッシュを消して動作確認

@gentksb
Copy link
Owner Author

gentksb commented Sep 25, 2024

passthroughImageServiceだとwebpのみ出力するためと判明

@gentksb
Copy link
Owner Author

gentksb commented Sep 25, 2024

ImageResponseはwebpを受け付けるため、根本解決には「webpをog:imageにも設定する」か、現状の許容が必要

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant