code: public static @Nullable RenditionMetadata getWebRenditionForCropping(@NotNull Asset asset) {
      return asset.getRenditions().stream()
          .filter(AssetRendition::isWebRendition)
          .findFirst()
          .map(rendition -> new RenditionMetadata(rendition))
          .orElse(null);
    }
docs: Get web first rendition for asset.
  This is the same logic as implemented in
  <code>/libs/cq/gui/components/authoring/editors/clientlibs/core/inlineediting/js/ImageEditor.js</code>.
  @param asset Asset
  @return Web rendition or null if none found