Skip to content

create storage for too-large images (and to keep them across sessions)#67

Open
essential-randomness wants to merge 2 commits intomainfrom
image-storage
Open

create storage for too-large images (and to keep them across sessions)#67
essential-randomness wants to merge 2 commits intomainfrom
image-storage

Conversation

@essential-randomness
Copy link
Member

This PR makes it so we can resize images once they're pasted in the editor (my editor was struggling when i pasted too many too large images).

I would avoid reviewing plugins/hyperimage/src/indexed-db-image-store.ts (maybe?) and plugins/hyperimage/stories/StorageDebugPanel.tsx cause either boilerplate mostly (the first one) or the worst react code i threw together cause i needed to figure out if this was working.

@netlify
Copy link

netlify bot commented Feb 23, 2026

Deploy Preview for astrolabe-editor ready!

Name Link
🔨 Latest commit d96498e
🔍 Latest deploy log https://app.netlify.com/projects/astrolabe-editor/deploys/699bb56d2131e9000873e9ab
😎 Deploy Preview https://deploy-preview-67--astrolabe-editor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Collaborator

@virtuous-cat virtuous-cat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

There's one section that looks like some clean up got undone in a conflict resolution or something, but I will leave it to you to decide whether to fix it here or merge this first.

images.forEach(async (image) => {
const file = await imageToFile(image.src);
insertImage({ editor, file });
const parsedDoc = new DOMParser().parseFromString(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like the changes in this function are maybe a regression except for the adding of the processorConfig to the insertImage arguments? The "old" version is more readable and seems like something that was cleaned up after the branches diverged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants