Database image size

I have a custom list with pictures. I have created from free images, some times with large size, sometimes smaller. In PWA I thing is slow to load. It will better reduc de image before update the image or the adalo can do that.

I.e. I have images with 1mb, 500kb, 1,5MB. But I do not know what size is in ondatabase.

Someone to explain???

Hi Camilo,

I think what you’re trying to say is you want to reduce the image size before loading it to Adalo. You’ll want to look at a 3rd party image resizer, like https://www.imgix.com/, to reduce images before they’re loaded to Adalo.

Best,
Erik

exactly. But I still in doubt when I upload the image. The database takes the actual size right?

To be honest, I’m not sure. I think Adalo does some resizing and compression.

I also don’t think you can currently see your file sizes in the database right now.

cc: @Victor @theadaloguy

Hi @camilo1 @Erik,

As far as I know:

  • ImgIX is used as a CDN to “deliver” images to the apps.

  • Whether images are reformatted or not, it is still not very clear for me. When you try to get the image from collection, using URL, Adalo automatically adds “?orient” to the image path. This causes the size change, while keeping original dimensions. Not sure about the quality.

  • But when you remove this “?orient” from the image path, you can get the original image
    I guess only Adalo dev team has all the details :slight_smile:

  • there is no built-in methods to get image size, but request to the API has “size” field in the reply. Here is the example:
    {"id":1,"Name":"Leaves","Photo":{"url":"https://adalo-uploads.imgix.net/2875301c0344f7fa97b1ce28ef45558fc8d00bca6280b23996e072cc40b5203c.jpg","size":73690,"width":640,"height":853,"filename":"file.jpg"},"EX5_Photo Category":[2],"Comment":"Comment for Other Cat","created_at":"2020-11-25T17:06:21.516Z","updated_at":"2021-01-29T17:54:59.279Z"}

So it is possible to get the size of the image from the DB. I’d say, with similar to this solution (How to Access Record ID information - #26 by pford) one can even have size field in the DB and update it automatically.

Best,
Victor.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.