code: private String buildMediaUrl(Dimension scaledDimension) {
  
      // check for file extension filtering
      if (!isMatchingFileExtension()) {
        return null;
      }
  
      // check if image has to be rescaled
      if (scaledDimension != null) {
  
        // check if scaling is not possible
        if (scaledDimension.equals(SCALING_NOT_POSSIBLE_DIMENSION)) {
          return null;
        }
  
        // otherwise generate scaled image URL
        return buildScaledMediaUrl(scaledDimension, this.media.getCropDimension());
      }
  
      // if no scaling but cropping required builid scaled image URL
      if (this.media.getCropDimension() != null) {
        return buildScaledMediaUrl(this.media.getCropDimension(), this.media.getCropDimension());
      }
  
      if (mediaArgs.isContentDispositionAttachment()) {
        // if not scaling and no cropping required but special content disposition headers required build download url
        return buildDownloadMediaUrl();
      }
      else {
        // if not scaling and no cropping required build native media URL
        return buildNativeMediaUrl();
      }
    }
docs: Build media URL for this rendition - either "native" URL to repository or virtual url to rescaled version.
  @return Media URL - null if no rendition is available