Media loses info causes site crash errors

Created on 22 November 2023, 8 months ago

Problem/Motivation

When using this module and for some reason the image is unable to grab the info, mainly the width and height, the site crashes causing a website encountered an unexpected error. There a multitude of reasons why an image can lose its information, one example is if you implement a file limit size after a file larger than that size has already been uploaded, then the image info can not be retrieved. I am sure that there could be other instances, if the file gets resized by an image style or another contrib module.

Proposed resolution

This module should ensure that there is a width and height on the image info before try to resize. Even if there is only one, the image will still get the attributes correctly in the browser. So if you choose just a width, the image does get resized even if you can not retrieve the width from the image info. Will provide a patch.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada ebremner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024