Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-68581

Web content images get horizontally compressed when the image width is wider than the portlet width

    Details

      Description

      Description:
      If you add an image to a Web Content asset, then resize using the bounding box (top right or left, and bottom right or left corners) and drag diagonally, then display the same content through Web Content Display portlet, the image will not be represented by its original ratio.

      Note: If the resized image in Web Content asset is SMALLER than the bounding boxes of Web Content Display portlet, then the image will preserve its ratio. However, if the image is LARGER than the bounding boxes of Web Content Display portlet, then the image will be distorted and try to stretch into the Web Content Display portlet's width.

      A video has been attached to demonstrate the behavior.

      Steps to reproduce:
      1. Start up 7.0 DE with Fixpack DE-4
      2. Sign in as test@liferay.com
      3. Menu Bar > Liferay DXP (site) > Content > Web Content
      4. Add > Basic Web Content, and give it the title "Test"
      5. Click Content > + > Image icon
      6. Add a wide/large image (Upload a screenshot of your desktop for example)
      7. Publish
      8. On the Liferay DXP (site) > Welcome page, add a Web Content Display portlet, and configure it to display the "Test" asset
      9. Go back to Menu Bar > Liferay DXP (site) > Content > Web Content > Edit the same Web Content asset, and modify the image by resizing – drag the diagonal corners (top left/right, bottom left/right) to make it bigger or smaller.
      10. Go back to the Welcome page and refresh

      NOTE: If you are having trouble reproducing this behavior, please set the page layout to 2 column 50/50

      Expected Result:
      Image preserves the original ratio but displays in a scaled format on the Web Content Display portlet

      Actual Results:
      Image does not preserve the original ratio, and displays in a stretched form on the Web Content Display portlet

        Attachments

        1. 7.0pass.png
          7.0pass.png
          325 kB
        2. 70.jpg
          70.jpg
          864 kB
        3. master.jpg
          master.jpg
          512 kB

          Issue Links

            Activity

              People

              Assignee:
              steven.gao Steven Gao (Inactive)
              Reporter:
              john.zhao John Zhao (Inactive)
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 51 weeks, 2 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP9
                  7.0.0 DXP SP2
                  7.0.3 CE GA4
                  7.1.X
                  Master