Image Upload Mechanism
Learn how Moire handles image uploads and its limitations
Moire supports inserting images into notes, but there are some important limitations to ensure stability.
How It Works
Section titled “How It Works”When you insert an image in Apple Notes and sync:
- Shortcut extracts the first image from the note
- Converts the image to Base64 encoding
- Uploads it to the
/src/memos/images/directory in the GitHub repository - Automatically inserts the image link into the Markdown file
Important Limitations
Section titled “Important Limitations”1. Supports only 1 image per sync
Section titled “1. Supports only 1 image per sync”Whenever the Moire Sync Shortcut runs, it will only upload the first image found in the note.
This is to ensure the speed and stability of the Shortcut.
2. No automatic image deletion
Section titled “2. No automatic image deletion”Currently, Moire does not handle the deletion of images automatically.
To prevent the GitHub repository from growing excessively, please be cautious when replacing or deleting images in your posts. If you remove an image link from your note, the previously uploaded image file in /src/memos/images/ will still remain in the repository.
Recommendations
Section titled “Recommendations”- Keep it to 1 image per note
- Use the image as a cover or key visual
- Keep image size under 1MB
❌ Don’t:
Section titled “❌ Don’t:”- Insert multiple images (only the first will upload)
- Upload oversized images (may cause sync failure)
- Rely on images for critical information (may load slowly)
Image Naming
Section titled “Image Naming”Uploaded images are automatically named as:
[file-hash].pngTroubleshooting
Section titled “Troubleshooting”Image not uploading?
Section titled “Image not uploading?”Possible causes:
| Issue | Solution |
|---|---|
| Image too large | Compress the image or use a smaller format |
| Network timeout | Check your connection and retry the sync |
| Insufficient Token permissions | Ensure Token has Contents: Read/Write permissions |
| Unsupported format | Use PNG or JPG |
Image displaying incorrectly?
Section titled “Image displaying incorrectly?”Check:
- If GitHub Actions built successfully
- If the image was correctly uploaded to
/src/memos/images/ - If the image path in Markdown is correct
Need Multiple Images?
Section titled “Need Multiple Images?”If you need more than one image in a post, here are alternative solutions:
Option 1: Create a Collage
Section titled “Option 1: Create a Collage”Combine multiple images into one before uploading.
Pro: Only counts as 1 upload
Con: Requires extra tools for processing
Option 2: Manual Upload
Section titled “Option 2: Manual Upload”- Manually upload images to the repository’s
/src/memos/images/directory - Use relative paths to reference them in your note
Pro: Full control
Con: Loses the convenience of the Shortcut
Next Steps
Section titled “Next Steps”If you are in mainland China, you may need to configure API acceleration.