Store image on an external db - HELP

Options
Hello everyone, 
I REALLY need to find a solution in order to reduce the size of the images within my app's database. Indeed Xano can't compress images, so I need to find an alternative tool. 

From what I saw, there are multiple alternatives :
• Uploadcare
• S3
• Google file storage
• Other ? 

What would you recommand since I need a mix of simplicity and performance ? 

Thanks !

Comments

  • Brandon Hassler
    Options
    Xano noob here, but I imagine part of the answer should factor in cost. In both speed and cost, it seems like S3 is the most robust solution.
  • Robin C
    Robin C Member
    Options
    That's what i think aswell, but I saw a lot of people talking about Uploadcare in Xano's community.
    Moreover, how simple do you think it is to set the workflow between S3 and Xano ? 
  • Brandon Hassler
    Options
    I'm just spit balling, but perhaps there is some sort of way to use a 3rd party compression tool and still save the images to your Xano DB?

    The logic would look something like calling that 3rd party compression API by sending them the photo. They compress it and send it back and that is the new version you save to DB.

    Maybe that's not a thing that exists. If not, there is your next billion dollar company 😂
  • Brandon Hassler
    Options
     I've not done this myself, but just like any external API, you just need to build out a call to connect to their DB and follow their documentation.

    Here's an answer from  that seems to outline what you need to do: https://community.xano.com/c/help-im-a-noob/external-storage#comment_wrapper_6652357
  • Robin C
    Robin C Member
    Options
     It must exist indeed but 25g of file bandwith each 30days seems very very small for my app, even with compressed image.. 
  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options
    Hi, Robin. Great question, and thanks again  for always jumping in and helping, we really appreciate it.

    Robin, I wonder if you could simply utilize something like TinyPNG – Developer API, which seems pretty affordable, and could compress your image on the fly before being stored in your Xano database. I'll try to work on an example of this today, just to make sure it's nice and smooth, but could be a great option if you want to give it a shot yourself in the meantime.
  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
    Uploadcare is simple and pricier. S3 is robust and simpler. 

    Moving bits is one of the areas where there are no shortcuts - it's buying a scarce resource. Many apps are basicallywrapping small amounts of compute, storage and network bits to serve high-level logic that adds a lot of value. Like turning a few megabytes of data into invoices that manage the flow of processes and money. These businesses are cool because their underlying gross expenses approach zero. 

    But if your business is heavy with files, such as images, video and the like, you're going to spend  on storing those to a disk somewhere, and pay for their bytes to be moved on the network. That means you will have more crowding on your gross margins. Plenty of businesses that required lots of storage but didn't charge much (if at all) were a delight for their customers until the day the business went under because their expenses outweighed their income. 

    The way you pay will be denominated in your time and your money. Time to learn a lower-level less-no-code solution like S3 and the AWS ecosystem and pay the lower fees for a closer-to-the-metal solution. Or money to outsource more of those concerns to a third party with less time investment on your part. - the Uploadcare theory of the case. 
  • Robin C
    Robin C Member
    Options
    Thanks Chris, that is exactly what  was talking about and it seems to be the best option here. (What about Xano implementing its own compression service in the future 👀)

    But, as it is the first time I'm building an app (supposed to be) that big, I can't really measure what 25gb of bandwith represent. Let's say I have 300 users daily and each of them get to see 30 images, is TinyPNG's compression enough ? Or should I upgrade/use external service (S3 etc.) ? 
  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options
     Hard to say without being able to do the math, which could be done if you know the size of the images being served. Something that Xano does offer is dynamic image transformation, which would also decrease the bandwidth as users access these images in smaller dimensions. We also have add-ons available to increase certain features as needed, so you could add more bandwidth to your project without upgrading the plan as a whole.
  • Robin C
    Robin C Member
    Options
    Thanks  ! What I think is that I should learn how to use S3 as it is for sure going to be usefull, if not now then later in making nocode stuff. 

    Regarding my project, I am having trouble estimating how heavy it is going to be, from now, I think I can start with an image compression service, and then depending on my need, switch to a more relevant solution. 

    Do you know if there is a documentation/tutorial or anything showing how Xano and S3 works together ? Do I have to store image's URL from S3 into Xano ? How to set POST endpoints for images ? I don't know where to start aha 
  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
     300 users/day x 30 days/mo x 30 images x 100kb per image = 27gb/mo. Thumbnailing, gzip encoding and CDN caching can help move that last number up or down 
  • Robin C
    Robin C Member
    Options
     Thanks Chris, I am already using theses templates ! Ok that is a good point. 199$ is too expensive for me right now, those addons could be interesting !
  • Robin C
    Robin C Member
    Options
      Thanks for doing the maths aha ! I'll defintely need more... Guess I have to check what S3 has to offer ! 
  • David Richardson
    Options
    The Uploadcare solution has some nice features - specifically their uploader that is *user* friendly but setting it was a bit complicated.   Their website is a firehose of options at EACH step of the way - 20 resources for jQuery _ (I'm exaggerating) instead of one solution - THEN - how to add features.  

    Depending on the file size and aspect ratio, virtually ANY combination of effects, filters sizing and much more can be achieved after uploading the file before it is stored in their Amazon resource or another server farm or on your own server.  Their server allows modifications on the fly to reduce latency (smaller file size for instance) but maintaining the original pixel density.  Nice.  Lazy loading. etc etc.  They might meet ANY of your needs but they might be more expensive.  Due diligence.