laosb/ghos3

Image URL and Automatic Resize of Images

Closed this issue · 2 comments

I'm wondering if it's possible to have the blog's hostname in the image URL instead of the S3 endpoint.

From this:
https://s3-us-west-2.amazonaws.com/bucket/image.jpg

To this:
https://our-blog.com/content/images/size/w1200/2023/11/image.jpg

We're interested in this change because we have CloudFlare set up in front of the blog and want CloudFlare to handle the caching.

Additionally, I'm wondering why the image size is not specified when using this adapter, as all the image URLs seem to point to the full-size image.

assetHost option should be able to change the URL prefix.

I agree there should be sizing & other image optimizations, but currently there's nothing a storage adapter can do in terms of this. The only option I know of is https://ghost.org/docs/config/#image-optimization, which is not configurable and is done by Ghost itself.

Let's close this as this is not currently doable from a storage provider/