Import images
See original GitHub issueJust in case someone wants to work on this, the implementation should have these attributes:
Technical
- The image source data (the base64 or whatever format) shouldn’t be stored in
elements
array, but live in a separate data structure (likely inappState.images
). - The image source will be linked to an element (of
{type: "image"}
or something) that will live inelements
— this element will be used for manipulation, and act as a normal element would. - In collab, the image source shouldn’t be synced more than once per session. Only the element in
elements
array should be synced freely as we normally do with other elements. The image source should be compressed (usingEDIT: gzipping the image will actually offer almost no benefits, so let’s not do that. But we’ll want to serialize to binary string instead of base64 (which is inefficient). But we may also consider lossy compression (thus encode as JPG).pako
zlib library we’re already using for something else) before syncing/storing to database. Note, we’re talking about a lossless compression, but- There should be a limit on individual size, and likely a limit on total images per scene.
- When persisting the image to server (e.g. for collab scenes), we’re currently using Firebase Firestore, which has 1MB size limit on documents. So we’ll need to persist the images to separate Firestore documents, or preferably to Firebase Storage which is more suited for resources such as images (it also has better pricing per GB).
UI
- For the first iterration we don’t want any UI changes and adding images should happen with drag and drop (and maybe in the context menu to support mobile)
- Show additional information in stats
- Total number of images
- Total size of images
- When selecting an image or two… show their size.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:132
- Comments:43 (20 by maintainers)
Top Results From Across the Web
Import Image Racing - Discount Performance and Racing Parts
Import Image Racing has the newest and top performing import performance and racing parts for Subaru, Nissan, Mitsubishi, Honda and more.
Read more >398209 Import Images, Stock Photos & Vectors - Shutterstock
Import royalty-free images. 398,209 import stock photos, vectors, and illustrations are available royalty-free. See import stock video clips.
Read more >30,000+ Import Pictures | Download Free Images on Unsplash
Download the perfect import pictures. Find over 100+ of the best free import images. Free for commercial use ✓ No attribution required ✓...
Read more >600+ Free Import & Important Images - Pixabay
Import photos for download. All pictures are free to use. Container, Storage, Trade, Haulage ... World, Packages, Transportation, Import.
Read more >Importing Images With React - Stack Abuse
In this short article, learn how to import images in React using require() and the import statement.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
From UX perspective, you should be able to:
Wrong PR. This one is active: https://github.com/excalidraw/excalidraw/pull/3424. Will get back to it in a few days. Latest preview: https://excalidraw-9im2ruy53-excalidraw.vercel.app/