consumerfinance.gov icon indicating copy to clipboard operation
consumerfinance.gov copied to clipboard

Info unit images should fall back more gracefully

Open Scotchester opened this issue 6 years ago • 1 comments

If an image is not exactly square, bad things happen.

Current behavior

  • a 300x301 image will not render at the desired 150px width

(there may be other current undesirable behaviors related to 25/75 images, but this is the one we just noticed)

Expected behavior

  • the image would render at 150px width, with a height of 150 or 151 depending on rounding

Steps to replicate behavior

  1. Create an Info Unit Group with 25/75 layout
  2. Add an info unit and upload an image to it with a size of 300x301
  3. Preview the page and behold the gigantic image

Screenshots

Current

image pasted at 2018-8-6 12-56

Expected

image pasted at 2018-8-6 14-32

Scotchester avatar Aug 06 '18 18:08 Scotchester

Title updated to reflect the fact that this can happen on 50/50s, too. (I assume also 33/33/33s, though I haven't witnessed that.)

Scotchester avatar Feb 14 '19 20:02 Scotchester