Skip to content
This repository has been archived by the owner on Dec 25, 2022. It is now read-only.

Image downloading but not accessible — also bug depending on url. #11

Open
a-rbsn opened this issue Jul 30, 2020 · 4 comments
Open

Image downloading but not accessible — also bug depending on url. #11

a-rbsn opened this issue Jul 30, 2020 · 4 comments

Comments

@a-rbsn
Copy link

a-rbsn commented Jul 30, 2020

Having some difficulty with images and this plugin — there are two main issues I am facing.

Context:

I am using CraftCMS and the ElementAPI to generate a JSON API to use with this plugin.

First bug/issue:

url passed to createRemoteFileNode is either missing or not a proper web uri:

Even though my uri's being passed from craft are like so: /assets/images/L1000642ACR.jpg — it fails to detect/download the image, this appears to match what is in the docs.

To test some things out I appended the site URL to the API so it gave the full URL of the image — this allowed 2 out of 3 test images to download but the third still failed, I can only assume it's something to do with the filename of the image which is quite long and has differing characters within it:

url passed to createRemoteFileNode is either missing or not a proper web uri: http://livvy-cms.test/assets/images/home/Different-Interruptions-of-Dust-41x28cm-photogravure-print-etchin
g-paper-gold-ink-2016-of-the-1979-eruption-of-the-Soufrière-Volcano.jpg
Image downloaded: Post-Card-Image.jpg
Image downloaded: Different-Interruptions.jpg

This isn't ideal for production as the client could upload any image with any filename.
Edit: This is definitely because of the french character è in the filename, not sure how to resolve as of yet.

Second bug/issue

Taking the partial success of the two images that did download — I went into Graphql to see if it had worked. The images downloaded to Gatsby's cache which I assume is correct, but in GraphQL I have no access to:

                    childImageSharp {
                        fluid(maxWidth: 2000) {
                            ...GatsbyImageSharpFluid_withWebp
                        }
                    }

on the local node — any ideas/suggestions would be great.

Edit: I didn't have either sharp plugin installed... hence the images weren't available in GraphQL — worth mentioning in docs? The image name thing is an actual bug though.

@MuhammadHadiofficial
Copy link

Did you fix the issue? I Am facing same issue with Gatsby 3 images are downloaded but not accessible from graphql

@benslv
Copy link

benslv commented Aug 30, 2021

Also having this issue, I think. The console displays that the images have been downloaded, but GraphQL shows the node as null.

image

@a-rbsn
Copy link
Author

a-rbsn commented Aug 31, 2021

@benslv — I'm trying to use this plugin on a new site, I'm currently in the situation where I can have all of my data related (conference->event->image) and have the image unaccessible, or have my data separate (conference, event->image) and have the image accessible. I feel like this plugin hasn't been maintained for Gatsby 3.

@MuhammadHadiofficial
Copy link

I think thats because this plugin was not updated to new breaking changes of gatsbyv4?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants