Base64 Image to Custom State

Greetings,

I am trying to store compressed base 64 images to a Custom State with a state type Image. I don’t want to upload to the database quite yet.

I would like to do this as I would like to use those images in an image slider plugin. It wont take “text” as a dynamic input, only “image”.

I would like this to work on mobile swipe.

Any help would be greatly appreciated.

1 Like

Hello,

It sounds like this plugin might be what you are looking for: Better Uploader ☁️ [Free Plugin]

If that isn’t helpful then I would review this thread by the plugin’s author: Important Information about context.uploadContent()

2 Likes

As @bubble.trouble kindly mentioned, my plugin Better Uploader does exactly what you need it to do! You can keep files in the browser and do anything you want with them before they get sent to bubble.

Does Better Uploader have a compression feature? if not what would you recommend

If you have some technical knowledge, you could use the “Raw Data” Exposed State inside the Better Uploader plugin and follow the steps here to compress images yourself using a <script></script> tag inside an HTML element and the Raw Data as the source file. Then you would have to save the somewhere and send it to the server.

Otherwise, I am not aware of a file compression plugin. Seems like something that could be achieved using my plugin though, and a little bit of work.

1 Like

Anytime you take an image, put it on a canvas, and then turn it to base64, you can also control the compression :slight_smile: et voilà

2 Likes

Slightly off subject but when I have a list of S3 URLs in the DB it takes an extremely long time to load those images, even at a lower res. when I view the database it even takes time to load. Any ideas??? I only had 3 data entries.

This topic was automatically closed after 70 days. New replies are no longer allowed.