Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-10757

SVG images cannot be cropped

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Duplicate
    • 4.2.2
    • None
    • None

    Description

      There are a few concerns regarding variants created when users upload SVG images and our image cropper.

      The original image reports 0 width and height, so the cropper assumes the target variant dimensions (for any variant) are larger than the size of the original image, and if upscaling is disabled, the cropper is disabled.

      Enabling upscaling leads to more problems, cause then the cropper is enabled but an attempt to crop an svg variant fails with

      ERROR [ImageCropEditorDialog.onOk:324] Unable to create thumbnail image
      INFO org.hippoecm.frontend.plugins.gallery.model.GalleryException: Unsupported MIME type for reading: image/svg+xml
      INFO at org.hippoecm.frontend.plugins.gallery.editor.ImageCropEditorDialog.onOk(ImageCropEditorDialog.java:273)

      The above makes sense if one sees how the cropper looks for svg variants, the cropping mask is 0x0 pixels and not usable.

      What does cropping an svg mean? Since this is not a raster graphics, generating crops probably needs to happen via changing settings in the variant, like width and height, clips and masks.

      Attachments

        Issue Links

          Activity

            People

              kmoore Kathryn Moore (Inactive)
              mchatzidakis Minos Chatzidakis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: