Answer the question
In order to leave comments, you need to log in
How to properly display images with a watermark?
Good afternoon.
There is a site where photos of works are published. I need these photos to be shown on the site without a watermark, and given to other sites with a caption. You can determine by hppt_referer. But the question is: at what point to apply the watermark?
1. Just before sending, you can generate an image with a caption and give it away. But this approach creates a lot of unnecessary load on the server.
2. When saving a photo, generate a copy with a watermark and then give it away. But in this case, the files will take up two slaves more space.
Please tell me the best way to solve this problem?
Answer the question
In order to leave comments, you need to log in
Place is now cheaper than resources. Therefore, I think the best option would be to give the dynamically generated file for the first time and put it in the cache, and then give it from the cache.
If you feel sorry for the places, you can keep track of the "hotness" of images and delete the most unpopular ones from the cache
why not generate an image with a watermark on request and put it in the cache
and return it from the cache when you re-access
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question