Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add media library support #14

Merged
merged 2 commits into from
Nov 29, 2017
Merged

Conversation

erquhart
Copy link
Contributor

@erquhart erquhart commented Nov 28, 2017

First off, great repo here! It's been super helpful for the community.

I learned recently that Gatsby can't jam with absolute paths, and the CMS media library can only deal in absolute paths, so the best approach for now is to not use the Sharp plugin.

You can see this update in action here: https://confident-tesla-98159e.netlify.com/

Images are at least as clear as before, and all appears the same across breakpoints.

This PR does the following:

  • References frontmatter images as strings instead of Sharp nodes
  • Moves all images to static/img
  • Updates image paths in markdown files
  • Adds hidden path field to product page

@AustinGreen
Copy link
Contributor

Thanks for the PR. I appreciate the work you and the team have put into Netlify CMS. It seems like there are new features every week!

I'll go ahead and merge this PR, and keep an eye out for a resolution to this issue.

@leptest
Copy link

leptest commented May 22, 2018

I was getting ready to do the exacy opposite PR before i realised the issues with netlify CMS relative paths 🤕

Has there been any new developments on being able to use the Sharp plugin with netlify CMS?

@erquhart
Copy link
Contributor Author

@leptest here are a few related issues that touch on the problems discussed in today's call:

@erquhart erquhart deleted the media-library branch May 23, 2018 17:37
@leptest
Copy link

leptest commented May 23, 2018

Ah thanks! Seems a tricky one.

Once I've finished up this current project I'll try dig into a bit deeper and see where help is needed.

@sheadscott
Copy link

Not sure if this is the right place for this, but I came up with a workaround to generate different size images in the build process. The shell script is here as imagemagick.sh https://github.com/sheadscott/gatsby-starter-netlify-cms

csw1995 pushed a commit to csw1995/unused-blog that referenced this pull request Aug 14, 2019
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.

4 participants