Skip to content

add cloudinary image upload support #428

Draft
rugeli wants to merge 10 commits intomainfrom
gallery
Draft

add cloudinary image upload support #428
rugeli wants to merge 10 commits intomainfrom
gallery

Conversation

@rugeli
Copy link
Copy Markdown
Collaborator

@rugeli rugeli commented Apr 7, 2026

Problem

What is the problem this work solves, including
step 1 of #88

Solution

What I/we did to solve this problem

  • added a custom widget that opens the cloudinary upload widget , auto-derives upload folders from the cms entry.
    • one folder per cell line, e.g. cell-lines/AICS-{id}-{clone}
    • on successful upload, the widget stores the cloudinary img url into markdown frontmatter image field
  • created a shared component ImageRenderer to handle both gastby images(GatsbyImage) and external urls (<img>)
  • added image_url field via createResolvers in gatsby-node.js.
    • for a local image, image resolves to GatsbyImage, image_url is null
    • for cloudinary image urls, image is null and image_url carries the url

Notes:
This is mainly to show how Cloudinary can work with our current image management. With this change, images can now be uploaded to Cloudinary, while local images rendering still works the same as it does on main.

Things we can decide separately later:

  • whether porting the existing local images in this repo to cloud storage
  • in idea-board, implement a similar upload flow if we want to move forward with cloud image storage

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Steps to Verify:

  • add link to preview here
  • add link to admin preview here (and verify it loads)
  1. on admin page, edit a cell line entry and use the new image upload widget
  2. cloudinary upload widget should open and upload to the correct folder, link to gallery (lmk if you have any issues opening or viewing)
  3. all images on the site should be rendered

Screenshots (optional):

Show-n-tell images/animations here

  • in Cloudinary, images are stored in designated folder structure
Screenshot 2026-04-07 at 2 51 54 PM
  • on the admin page, users can upload images to the cell line folder in Cloudinary. Local image preview remains unchanged.
Screenshot 2026-04-07 at 2 59 36 PM
  • but if clicks on Replace Image for a local image, the replacement image is uploaded to Cloudinary instead.
Screenshot 2026-04-07 at 3 22 51 PM

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 7, 2026

Deploy Preview for cell-catalog ready!

Name Link
🔨 Latest commit 22f73f2
🔍 Latest deploy log https://app.netlify.com/projects/cell-catalog/deploys/69d58c613a738a00083755f0
😎 Deploy Preview https://deploy-preview-428--cell-catalog.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.

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.

1 participant