extensions: Error when resizing image TypeError: Cannot set property 'resizedImage' of undefined

Hello, I installed the Resize Image Extension but it breaks with the following error:

Error when resizing image TypeError: Cannot set property 'resizedImage' of undefined

Screenshot: Screenshot from 2019-12-10 09-50-06

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 16 (6 by maintainers)

Most upvoted comments

I’m struggling to reproduce this. I’ve tried an existing instance and a totally fresh one but I can’t trigger this error.

Could I ask how you are uploading an image? (e.g. web console vs Web SDK vs Android SDK etc).

If I were to stake a guess, when the image is added, we pass it’s data into the resizer function, which attempts to assign a metadata.resizedImage field on-top of the original images metadata. I think that depending on how the image is uploaded , that image may not be created with an original metadata field, therefore this error occurs as it’s trying to assign a property to something which doesn’t exist.

A simple fix would be to change this line to metadata: objectMetadata.metadata || {},.

I’d be interested to see though why no metadata is being created by default, to understand where that happens.

Hello, I’m Facing Same Issue Error when resizing image TypeError: Cannot set property ‘resizedImage’ of undefined & Error when deleting temporary files { Error: ENOENT: no such file or directory, unlink

storage-resize-images extension version 0.1.3 configuration parameters -Deployment location us-central1 -Sizes of resized images 200x200,500x500,1240x1240 -Deletion of original file false -other’s are default unset

I have upload it from sdk firebase": “6.3.0”, “firesql”: “2.0.2”, “linq2fire”: “1.0.22”, “react”: “16.8.3”, “react-native”: “0.59.9”, I try installing extension from both way console and cli none of them work for me

1Screenshot from 2019-12-11 13-21-48

And also its not creating resized file name with attached original file name + height,weight its showing direct _200X200

Screenshot from 2019-12-11 14-24-36