question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Just in case someone wants to work on this, the implementation should have these attributes:

Technical

  1. The image source data (the base64 or whatever format) shouldn’t be stored in elements array, but live in a separate data structure (likely in appState.images).
  2. The image source will be linked to an element (of {type: "image"} or something) that will live in elements — this element will be used for manipulation, and act as a normal element would.
  3. 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.
  4. The image source should be compressed (using pako zlib library we’re already using for something else) before syncing/storing to database. Note, we’re talking about a lossless compression, but EDIT: 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).
  5. There should be a limit on individual size, and likely a limit on total images per scene.
  6. 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:closed
  • Created 4 years ago
  • Reactions:132
  • Comments:43 (20 by maintainers)

github_iconTop GitHub Comments

42reactions
jaredpalmercommented, Jan 5, 2020

From UX perspective, you should be able to:

  • Drag and drop any image onto the window/canvas
  • Paste from image clipboard
  • Change fill mode: Fill, Contain, Tile
22reactions
dwellecommented, Aug 17, 2021

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/

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found