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

Use with Cloudinary Images #14

Closed
davidkartuzinski opened this issue Jul 25, 2019 · 6 comments
Closed

Use with Cloudinary Images #14

davidkartuzinski opened this issue Jul 25, 2019 · 6 comments
Labels
need more info Need a repo or code example to further debug.

Comments

@davidkartuzinski
Copy link

davidkartuzinski commented Jul 25, 2019

I am trying to figure out how to use your plugin to solve an issue with the way gatsby-image is unable to "find" images that are parsed through react-markdown. My understanding is that it has to do with this issue with Gatsby: gatsbyjs/gatsby#3608, gatsbyjs/gatsby#13353 - both of these issues basically talk about it.

If someone uses a WYSIWYG editor (for example) and within the body of the content images are placed, then the graphQL query gets something like "content", and inside this content, we have the images.

It is those images that gatsby-image cannot find and parse.

Here is an example:

https://strapi-gatsby-postgresql-demo.netlify.com/Article_1 - the top image is directly accessible through the graphQL query as it's own thing. In this case, "header image". If you look at the image, you will see it has been transformed by gatsby-image. The second image on the page, if you inspect is just resized but is 3mgs. This was part of the query parsed by the react-markdown.

My question is, can your plugin "reach in" and find URLs there? And using Cloudinary hosted images as an example, I can't quite figure out how to configure the gatsby-config.js.

Here is the full repo. https://github.com/strapi/strapi-heroku-cms-demo - in case this is helpful. It does NOT have your plugin installed.

Thanks for any insights on this.

@graysonhicks
Copy link
Owner

Hi @davidkartuzinski ! So you are trying to get an image from the markdown provided in the Strapi api request?

@graysonhicks graysonhicks added the need more info Need a repo or code example to further debug. label Aug 9, 2019
@lennoxivius
Copy link

I have the same problem, where my markdown is supplied by Strapi, and the images in the markdown comes from amazon S3. By using react-markdown the image gets correctly transformed to an html image, but it does not get processed by gatsby-image, just the img tag with src. I have tried gatsby-remark-images, but nothing works. Any ideas?

@graysonhicks
Copy link
Owner

Hm, that should be something that gatsby-remark-images should handle. See this issue for how other CMSs handle that. gatsby-uc/gatsby-source-strapi#62 re: contentful

@davidkartuzinski
Copy link
Author

Hello. Sorry for the late response. This is definitely a Strapi issue. They know about it and it is documented internally. This issue has something to do with the way the Strapi editor outputs the images. Until the editor is fixed, I cannot give you more data.
Thank you.

@kaleabmelkie
Copy link

Any updates?

@davidkartuzinski
Copy link
Author

@kaleabmelkie I haven't looked at this issue since I stopped working at Strapi. However, I heard that instead of using the gatsby strapi plugin, you can try to use the gatsby source plugin instead and then you will be able to properly manipulate your images.
As far as I know, the strapi gatsby plugin has not been updated, but that it is being considered after the stable release of Strapi in the next quarter or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Need a repo or code example to further debug.
Projects
None yet
Development

No branches or pull requests

4 participants