hpe-dev-incubator / hpe-dev-portal

MIT License
9 stars 122 forks source link

Management of Images assets stored on CMS? #173

Open choukden opened 3 years ago

choukden commented 3 years ago

How do we plan to manage the image assets that are referenced in the blogs? An example of the image asset URL https://hpe-developer-portal.s3.amazonaws.com/uploads/media/2020/12/h3-1610447669565.png

Do we plan to maintain the S3 bucket on AWS or store the images on local CMS v2? If the latter, how do we manage the links to the images on all the published blog posts?

reddypramod85 commented 3 years ago

Yes, we do plan to maintain the S3 bucket. Looking to integrate Netlify CMS with gatsby and S3.

reddypramod85 commented 3 years ago

@Didier-Lalli @choukden I don't see a way to integrate Netlify CMS with the S3 bucket. https://github.com/netlify/netlify-cms/issues/432

ShimiSun commented 3 years ago

Can you please add requirements and acceptance criteria to this issue, it needs clear what? What are the technical expectations that will solve this issue?

reddypramod85 commented 3 years ago

Currently, in the V1 DEV portal, we are storing all the assets/images uploaded in the CMS blogs, platforms pages, etc into the S3 bucket.

Similarly, in the V2, we wanted to continue storing the assets from Netlify CMS into the same S3 to have a smooth migration.

Navigation: Go to CMS: https://hpe-dev-portal.netlify.app/admin Select a collection: example, Blogs -> New blog image

When you try to upload an image EX: Author Image then it should get stored in the S3 bucket.

image

Currently, it is configured in the config.yml (static/admin/config.yml) file to store all the assets in the /static/img/ folder, we need to find a way to change it to S3.

reddypramod85 commented 3 years ago

I have added Cloudinary integration with Netlify CMS to store the image assets in Cloudinary. This is an alternative solution to S3 to store images in the cloud. Link to PR https://github.com/hpe-dev-incubator/hpe-dev-portal/pull/244

choukden commented 3 years ago

@reddypramod85 Thank you Pramod. Does it mean for existing assets in CMS v1, do they need to be migrated to Cloudinary store? Or is Cloudinary just for newly created assets?

reddypramod85 commented 3 years ago

@choukden I don't think we need to migrate the existing assets. For now, Cloudinary is only for new assets.

reddypramod85 commented 3 years ago

External contributors need to login to Cloudinary before uploading any assets. To avoid this complexity, we will be storing the image assets in the GitHub repo itself till we find a solution to store them in the S3 bucket. Later, we need can migrate all the current assets in the GitHub repo to S3.

choukden commented 3 years ago

@reddypramod85 How does it affect the M&L event page we built together yesterday with the M&L image from Cloudinary?

reddypramod85 commented 3 years ago

@choukden I updated the M&L card on the events page with a new image uploaded, you can view the preview here

choukden commented 3 years ago

@reddypramod85 This is perfect! Thank you so much.