With the story defined in https://issues.liferay.com/browse/LPS-69533 Portal Administrator can manually trigger the process to create the adaptive media images that, although should be available, are not for any of the following reasons:
- There was an error while creating the optimized adaptive media image and finally it wasn't created.
- Adding a new Configuration in Adaptive Media, so all the previous existing images don't have an adaptive media version for that specific configuration.
However, we would like to make the process even smarter. Imagine the following scenario where the user wants to view a Blog Entry that contains an image with 4 different image variants and one of them hasn't been created because the configuration was added after the image. In this case, when the user views the blog entry the html will have something as:
<img src="url-to-default-image" />
When the users views the blog entry, the first 3 urls will point to valid images and they should work. However, the last url won't have a valid adaptive media image created yet, so it should return a Response Code saying that it's not available, and trigger the process to create the optimized image for the missing configuration, so the next time a user views the same blog entry, the image might be already generated and it can be displayed.
The image generation process should be Synchronous, so in case that multiple users access to the same blog entry, we only trigger one process to generate the image instead of triggering lot's of process for the same image.