I added today the following functionality to my toy fork: if a picture is served, you pass a GET request to the endpoint with the URL in the query string and get back a link to a resized WEBP picture from S3. I found some pictures that were served and wanted to use them.
I choose WEBP format to limit traffic on S3 and bandwidth usage on mobile (and canIUse is :ok).
To run in a Livebook:
map= %{url: <the url.png>, w: 900, h: 600})
URI.parse("https://up-image.fly.dev/api")
|> URI.append_query(URI.encode(map)
|> URI.to_string()
|> Finch.get()
|> Finch.build(MyApp.Finch)
or
curl -X GET https://up-image.fly.dev/api?url=<the url.jpeg>&h=600&w=600
It will deliver a json reply with the URL of the new file in S3.
Let me know if you find some interest.
Endpoint: (normally works 😀) https://up-image.fly.dev/api
I added today the following functionality to my toy fork: if a picture is served, you pass a GET request to the endpoint with the URL in the query string and get back a link to a resized WEBP picture from S3. I found some pictures that were served and wanted to use them.
I choose WEBP format to limit traffic on S3 and bandwidth usage on mobile (and canIUse is :ok).
To run in a Livebook:
or
It will deliver a
jsonreply with the URL of the new file in S3.Let me know if you find some interest.
Endpoint: (normally works 😀) https://up-image.fly.dev/api