openstreetmap-ng
openstreetmap-ng copied to clipboard
Caching and compressing image proxy
trafficstars
Currently, when using markdown, images are served as-is. To enhance performance and user privacy, we should implement a caching and compressing image proxy. This would:
- Reduce page load time
- Decrease bandwidth usage, especially noticeable in user diaries with large image files
- Mask users' IP addresses from external endpoints
As the NextGen platform, we should strive for better higher standards.
The URL rewrite can be implemented in the _render_image method.
The proxy should:
- Limit image size in megapixels to a reasonable value
- Compress files without noticeable loss in quality
- Cache processed images for improved performance
I will take care of that issue just before or shortly after the public release. I have done similar work in the past.