Commit Graph

8 Commits

Author SHA1 Message Date
Rostislav Wolny
b851f282f5 Save URL of thumbnail after saving original before compression
This change was done in order to prevent cron being stuck on
the image thumbnails job because a huge image may cause cause
we exceed memory limits
[MAILPOET-2686]
2021-11-08 13:24:53 +01:00
Rostislav Wolny
5134713c2d Optimize memory usage for batch processing of template images
NewsletterTemplateEntity carries base64 data of image. This commit changes how we load templates entities when we process thumbnail images so that there is only one template in memory.
[MAILPOET-2686]
2021-11-08 13:24:53 +01:00
Rostislav Wolny
ab23b06ff8 Use random hash in template image filename
[MAILPOET-2686]
2021-11-08 13:24:53 +01:00
Rostislav Wolny
b10bb31321 Add cron job for generating/re-generating template thumbnail files
[MAILPOET-2686]
2021-11-08 13:24:53 +01:00
Rostislav Wolny
58bcca67ed Allow saving only base64 encoded jpeg
The tool that we use on the frontend generates jpegs. This check adds a protection against saving different type of data.
[MAILPOET-2686]
2021-11-08 13:24:53 +01:00
Rostislav Wolny
6cfcf4b5b5 Add image compression when saving the newsletter template image
[MAILPOET-2686]
2021-11-08 13:24:53 +01:00
Rostislav Wolny
aed122f4a2 Update domain of the thumbnail in case the site domain changed
This handle cases when admin changes the site URL.
[MAILPOET-2686]
2021-11-08 13:24:53 +01:00
Rostislav Wolny
2bb74c6302 Add service for saving templates base64 data to image files
[MAILPOET-2686]
2021-11-08 13:24:53 +01:00