Issue #1721Opened January 9, 2019by ThunderDev11 reactions

[QUESTION] Resize image before adding it as base64

Question

I'm currently adding images to the canvas as base64 (embedAsBase64: true). I don't want to upload the image for the moment, to keep things simple. But, I want to be able to resize or crop the image before adding it through the asset manager as base64, to avoid oversized images added by the user.

Basically I would need an event before the image is added, so I can transform the image, but for now we only have access to asset:add event. Any ideas if this would be possible ?

Thanks

Answers (2)

artfJanuary 14, 20191 reactions

Well, obviously you can't resize and crop without having all the image data at first. So, on asset:add event propose your "crop and resize" solution and then update the asset with the new data

lock[bot]January 15, 20200 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.