Question regarding the CDN plugin

Hello all, I’m using Bastian’s CDN plugin to serve my thumb photos from Cloudfront. So it rewrites the URLs for just my thumbs. It works, but there if I manually upload a PNG (for example) to my thumbs folder and manually write a path to that PNG something like…

<img src="/thumbs/mypooch.png">

The plugin doesn’t seem to rewrite that URL? Any reason why? Maybe it doesn’t rewrite paths that you input manually?

Probably because you are using a relative path.

But apart from that I don’t quite see the. usefulness of uploading images to the thumbs. folder.

Thanks for the quick response.

In this case within Cloudfront I set the origin server to Cloudfront will only pull from that ‘thumbs’ folder. I had a couple loose UI graphics I wanted to include in the CDN so I figured I’d just upload them to the thumbs folder.

Even when I include the absolute path to the PNG it doesn’t rewrite the path. I suppose in all the cases where it is working I’m using one of Kirby’s methods to generate the URL such as…

<img src="<?= $img->resize(600)->url() ?>">

In this case, where I’m only concerned with a few instances, I’ll just use the CDN’s domain (e.g. so there’s no need to rewrite that bit. I’m still curious though as to why it wouldn’t rewrite the path.

Hm, then I guess it happens when the URL is rendered. Kirby doesn’t read. the URLs. in the rendered page to later rewrite them, that wouldn’t make sense.

Gotcha. Thanks again Sonja.