Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-21341

The attachment gallery picker is not preserving image ratio when downscaling

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A
    • Pull Request accepted

    Description

      Reproduction steps:

      • upload the 3 images in attachment of this issue on a page (200_200, 200_100, 100_200)
      • edit the page and open the gallery picker in the image selection

      Expected:

      Actual:

      Proposed fix, add keepAspectRatio=true to the image urls https://github.com/xwiki/xwiki-platform/blob/1eed1c849aa852824e8e3f4961fcc472e4e8992d/xwiki-platform-core/xwiki-platform-attachment/xwiki-platform-attachment-picker/xwiki-platform-attachment-picker-webjar/src/main/webjar/attachmentGalleryPicker.js#L249

      Attachments

        1. 100_200.png
          100_200.png
          7 kB
        2. 200_100.png
          200_100.png
          7 kB
        3. 200_200.png
          200_200.png
          13 kB
        4. image-2023-09-22-11-49-21-795.png
          image-2023-09-22-11-49-21-795.png
          131 kB
        5. image-2023-09-22-11-50-03-792.png
          image-2023-09-22-11-50-03-792.png
          131 kB

        Activity

          People

            mleduc Manuel Leduc
            mleduc Manuel Leduc
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: