Skip to content

Asset Image Editor throws JavaScript console errors on Craft Cloud environments #149

@jamesmacwhite

Description

@jamesmacwhite

Description

Under a Craft Cloud environment the Asset Image Editor fails to load properly and throws the following errors in the web browser developer console:

AssetImageEditor.js:322 Uncaught TypeError: e.image.getHeight is not a function
AssetImageEditor.js:515 Uncaught TypeError: Cannot read properties of null (reading 'width')
AssetImageEditor.js:515 Uncaught TypeError: Cannot read properties of null (reading 'width')

This causes either the image to partially load or not load at all in the editor with a spinner.

Image

The same asset can be edited on a local development environment that isn't Craft Cloud without any issues.

Possibly related to the recent Image transformer changes with Cloudflare.

Steps to reproduce

  1. Select an asset under Craft Cloud storage on a Craft Cloud environment
  2. Hover over the thumb image preview for the Edit Image option
  3. The Asset Image Editor modal will open but throw JavaScript errors related to the asset regard the width property.

Possibly also related CLOUD-637

Additional info

  • craftcms/cms version: 5.9.20
  • craftcms/cloud version: 3.0.9
  • PHP version: 8.4
  • Database driver & version: MySQL

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions