Media Handler: Responsive image resolving
what are our requirements for responsive image resolving?
currently the media args support a list of media formats, but it is always only one url resolved with the first media format that has a match.
to support responsive images where we want to generate mutliple different variants of images into the markup we need:
the possibility to specify multiple media formats (we can dot his already)
or do we need additional optional metadata for each media format which is rendered in the frontend as well for each resolved image (e.g. use this image for a certain min-device-pixel-ratio/max-device-pixel-ratio or min-width/max-width?
include a switch in media args to signal that all (and not only the first match) should be resolved.
what happens if some but not all could be resolved?
enhance the mediametadata object to allow returning multiple resolved metadata or return a list of mediametadata (details tbd)
sorry to reopen it again, but the same goes for the EditPlaceholderMediaMarkupBuilder. the check, if the rendition is null, is to restrictive, instead it should check, if the media is invalid + the rest of the checks, already in place.
i agree - fixed
looks good, i was able to get rid of all custom rendition resolving.
what still can be improved is the accept method of the SimpleImageMediaMarkupBuilder. Currently if i put mandatory media formats into the args and not all of them could be resolved, the responsive markup builder wont accept the media. but if at least one media format was resolved, the SimpleImageMediaMarkupBuilder would accept the media and render the image, although the media is marked as invalid. I would expect, that only dummy image markup builder would accept an invalid media.