Victrid / freshrss-image-cache-plugin

Cache feed images on your own facility or Cloudflare cache.
GNU General Public License v3.0
32 stars 6 forks source link

Piccache.php is unable to convert certain images #4

Closed Whichbfj28 closed 4 months ago

Whichbfj28 commented 4 months ago

for example

https://cn.nikkei.com/images/2024/05/0508/0508-08-L.jpg 【It can be opened normally.】

https://freshrss.*.com/i/piccache.php?url=https://cn.nikkei.com/images/2024/05/0508/0508-08-L.jpg 【Unable to open normally】

Victrid commented 4 months ago

nikkei has UA check, this part is handled in the cloudflare worker implementation:

https://github.com/Victrid/image-cache-worker/blob/f8c34756c5f0401810b04b88fa6285702c9ce40f/src/index.ts#L23-L40

The piccache.php script is only a proof of concept and will not handle these specific problem. I think you can change PHP's UA in php.ini file.