-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EPIC: Clarifying Goals/Roadmap for Image Uploads Project #91
Comments
Long time friend @jupiter πͺ created https://github.com/jupiter/rust-image-worker a few years back. β This looks like a very good starting point for what we want in terms of dynamic (URL param) re-sizing. π |
For URL param re-sizing, I've found https://dev.to/horaceshmorace/an-open-source-and-completely-serverless-image-resizing-service-in-aws-589b (with an accompanying https://github.com/HoraceShmorace/Image-Flex repo) for image re-sizing on AWS (what we're using). It might entail a revamp of what we have and discarding essentially our resizing lambda function, compressed bucket and a few other services. However:
|
Consider the following image: We can resize it dynamically without owning/hosting it: The only drawback I can see is that it doesn't yet work for
But this is definitely side-tracking and we should discuss implementation of "advanced" resizing in a dedicated issue rather than this Did you have any further thoughts on any of the items in the list above? |
Apologies for not making this clear earlier. I thought it was. But on reflection it really wasn't. π€¦ββοΈ
So I'm going to try and clarify. π€
We need a standalone image uploading App because images are used in many situations:
A. General Communication: we send many images (e.g: via Signal) each day;
images often communicate an idea considerably faster than text.
B. Business: accounting, banking, insurance, design, law, architecture, engineering, construction, etc. all employ image uploading, sharing, review & approval. If we have good image uploading and OCR we can build great business tools.
C. Social: thereβs a reason the most valuable valuable social networks (Instagram, Snapchat, TikTok, etc.) are based on images (and now video). It comes back to the communication speed; our eyes can process an image very fast and thousands of words can be conveyed in a single image.
We can build many different kinds of Apps if we get image uploading βrightβ.
The Goals of the Image Uploads (
imgup
) Project are:A fully functional image uploader that works on any device (Mobile, Desktop & API)
with an intuitive/familiar interface
that a completely non-technical
person
can use to easily upload a image/photo. πΈThere should be no "landing page" or button/link to click to upload; zero friction.
A robust
REST API
with excellent error handling + messagesthat we can use from any other platform e.g. our
Flutter
App. π±Comprehensive documentation + instructions for recreating the upload code, interface and
REST API
that anyone can follow (yes, includingClosedAI
... π€π). The better our docs the more people will consider contributing improvements. π€ The better the docs on a "showcase" project the much easier it is for you to get your next "job" or recruit people to your Startup. πReal Tests that fail when something goes wrong. Not Mocks that always pass and give
false
positives/negatives. We have built projects that upload toAWS S3
in the past and written real tests. e.g: https://github.com/dwyl/aws-lambda-deploy/blob/master/test/05_upload.test.js If we cannot figure out how to create real tests (AKA "end to end tests") for our project(s) then we have failed. Yes, I know that this is ironic considering we have theaws-sdk-mock
project, but that is for calling specific AWS methods in a complexJS
project where people don't want end-to-end tests. π©βπ¬Logging which device made the upload so that we have some metrics: π
Auth
to restrict who can upload files beyond a certain size e.g: allow anonymous uploads up to1mb
to test the demo App and then ifpeople
authenticate allow uploading up to10mb
and for paying customers e.g. Wedding Photographers taking43 megapixel raw photos
allow uploads of unlimited size. Spin up a dedicated Fly.io instance to avoid crashing on100mb+
files.Re-size and optimise (compress) large images to save bandwidth on mobile devices. π±
We already have a good proof-of-concept for this thanks to @LuchoTurtle π
But it currently only creates
200px
thumbnails that are tiny on any screen.e.g: https://s3.eu-west-3.amazonaws.com/imgup-original/zb2rhe5aFXPKonoWchLRYo9yJDqWyUdUeTQ6MQQJsTWnzzNum.jpg
Becomes: https://s3.eu-west-3.amazonaws.com/imgup-compressed/zb2rhe5aFXPKonoWchLRYo9yJDqWyUdUeTQ6MQQJsTWnzzNum.jpg
We need to make resizing dynamic (dependent on the screen size of the device)
or pick a frequently used screen size like
iPhone
andiPad
and render for that.See: Feat: Dynamic Image ResizingΒ #99
Use URL shortening & redirection (proxy) to serve images with shorter URLs e.g:
Instead of requesting the image directly from
S3
:https://s3.eu-west-3.amazonaws.com/imgup-compressed/zb2rhe5aFXPKonoWchLRYo9yJDqWyUdUeTQ6MQQJsTWnzzNum.jpg
The
imgup
app acts as aproxy
and the URL can be much shorter:https://dwy.is/zb2rh uses the minimum number of characters from the
CID
so theURL
is as short as possible.Request latency should be minimised to
Related Side Quest: dwyl/linky#13 π
Allow requesting several sizes of compressed images via URL params without changing the filename e.g:
Eventually migrate off
AWS S3
to somethingelse
to not waste cash... πΈe.g: BackBlaze Research: Cloud Object StorageΒ technology-stack#63 -> Chore: Replace
AWS S3
withBackblaze B2
Β #98or investigate
IPFS
But we need to run tests on request/response times (latency), durability and figure out how to do the resizing/compression. πAs you can tell from this list, we have already shipped a couple of the features.
But there's still quite a lot left.
I will work on splitting it all out into sub-issues/tasks. π§βπ» β³
The text was updated successfully, but these errors were encountered: