2

In SS4.4 - adding an image via the editor requires a width and height be set. If they're not it results in this error:

"Uncaught InvalidArgumentException: Width must be a numeric value".

Setting these dimension values breaks responsive images (600px X 400px) for example on a phone is 600 wide. Don't reach for max-width:100% just yet please, read on..

When adding those dimensions, the resulting link is: https://SomeSite.com/assets/SomeFolder/someimage__ResizedImageWzYwMCw0MDBd.jpg

Appears to use SS ResizeImage.

Ideally what I'd want is to:

  1. Not add dimensions and not have errors.
  2. Use ScaleMaxWidth() on it so if the image is under 600, leave it alone or if its over - reuse it.

I know I can do this when the image is it's own field and not in the editor.

polycode
  • 135
  • 7

0 Answers0