code: protected final boolean resolveRenditions(Media media, Asset asset, MediaArgs mediaArgs) {
      if (mediaArgs.getMediaFormats() != null && mediaArgs.getMediaFormats().length > 1
          && (mediaArgs.isMediaFormatsMandatory() || mediaArgs.getImageSizes() != null || mediaArgs.getPictureSources() != null)) {
        return resolveAllRenditions(media, asset, mediaArgs);
      }
      else {
        return resolveFirstMatchRenditions(media, asset, mediaArgs);
      }
    }
docs: Resolves single rendition (or multiple renditions if {@link MediaArgs#isMediaFormatsMandatory()} is true
  and sets the resolved rendition and the URL of the first (best-matching) rendition in the media object.
  @param media Media object
  @param asset Asset
  @param mediaArgs Media args
  @return true if all requested renditions could be resolved (at least one or all if
  {@link MediaArgs#isMediaFormatsMandatory()} was set to true)