umputun / remark42

comment engine
https://remark42.com
MIT License
4.84k stars 376 forks source link

Fix preview and comment work with proxified images #1656

Closed paskal closed 1 year ago

paskal commented 1 year ago

Previously, image proxying through API was not tested. The test is added here.

Previously, proxied and local images were checked for presence in the storage before previewing or posting the comment. That logic resulted in an inability to post with an image when a proxy for images is enabled, as proxied images are not downloaded to disk before the first time someone loads them, which could only happen after the user either previews or posts the message.

After this change, preview and post only checks the local images' presence and ignore the proxied ones.

Resolves #1631.