Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-6742

Multiple core blocks not using proper image "sizes" attribute


    • Icon: Bug Bug
    • Resolution: Merged
    • Icon: Must have Must have
    • 2.79.0
    • None
    • 5
    • Performance
    • Sprint #183
    • oberon

      Some core blocks that force a width on their content, currently don't set the proper attribute on images inside them. As a result the browser ends up loading images that are sized for the full screen width, rather than the actual width.

      Affected blocks:

      • Media and Text (fixed in this ticket but not the case where the block is inside a Column or another container)
      • Columns (not fixed in this ticket)
      • Post Featured Image (Query Loop, only fixed for the grid view)

      For example if an image is in a Query Loop block displayed as a grid with 4 items, the browser will load an image that is 4 times as wide as it should be. It can easily lead to sending 10 times the amount of data, or even more.

      There are a few options to modify image markup based on a block's column settings. In case of the Query Loop we can make the assumption that images will only be inside the post template.

            pvincent Pieter Vincent (Inactive)
            pvincent Pieter Vincent (Inactive)
            0 Vote for this issue
            0 Start watching this issue