Better image upload quality

A quick hack how to display an uploaded image in full quality with no compression artifacts:

  1. Upload an image e.g. to a table and wait for Coda to ingest (process) it.

  2. Copy the link to an image.

    image

    It’ll return something like this to you:
    https://codaio.imgix.net/docs/<DOC_ID>/blobs/bl-<BLOB_ID>?auto=format%2Ccompress&fit=max

  3. Replace codaio.imgix.net with codahosted.io and remove everything after the <BLOB_ID>, i.e. remove the ?auto=format... part.

  4. Put the resulting URL into an Image().

  5. Follow @CodaTricks — a mandatory step, otherwise the above trick won’t work :upside_down_face:

  6. Enjoy!


In other news — I’ll be making an Edit Images pack for the Packathon. Initially I planned to use Jimp or any similar JS library that I could load into Packs SDK but it turned out I could just leverage the Imgix service Coda is already using internally, and with no added cost to them (cuz transformations are free). How cool is that!

6 Likes