eexit / ghost-storage-cloudinary

:rocket: A fully-featured and deeply tested Cloudinary Ghost storage adapter

Home Page:https://ghost.org/integrations/cloudinary/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fall back to images in content/images/ if file exists?

ndbroadbent opened this issue · comments

Hello,

I'm setting up Ghost on Heroku via the awesome ghost-on-heroku. This provisions the Cloudinary resource and sets up ghost-storage-cloudinary by default.

My problem is that I have already migrated a lot of my blog posts to a Ghost(Pro) instance before I decided to host my own instance on Heroku. I was able to export all of my posts from Ghost(Pro) as JSON, and I downloaded all of the images by scraping the blog using wget --recursive. So I copied all of these historical images into content/images/. If I disable Cloudinary by unsetting the CLOUDINARY_URL, then everything is working great and all the images load properly.

However, when the ghost-storage-cloudinary storage is configured in this code, the server can no longer serve any of my images in the content/images/ folder.

I was wondering if it would be possible to support a hybrid approach where any new images are uploaded to Cloudinary, but this library also checks for any hard-coded images inside the content/images/ folder?