My 'gatsby develop' command fails as image files (coming from Drupal 8) are returning a 404 error - I don't understand why (this is new)

== Details: ==

JSON:API (which Gatsby uses to build the site), uses this URL: https://dev-tuckel.pantheonsite.io/jsonapi/file/file

it provides this image URL:


Which returns a 404. There are at least 3 other images that are returning a 404 error - this is strange.

== Investigation: ==

In: content> Files: the file is 165.17 KB, which is strange, as I ussually upload higher quality images.

it also says it has 1 "use count", however the "entity" field is empty (again, not usual)

I cleared the Admin > Performance cache (thinking it's may a thumbnail / cache file error).

The site is hosted in the free dev tier of pantheon.

Prior: I was not working on Drupal at the time of failure, I was working on Gatsby code.

If you have any ideas, it would really help because I'm stumped.

  • 2
    Where are the correct files? SFTP into the files directory and find them to check what is going on. Commented Feb 16, 2021 at 6:39
  • thanks, I got in via an SFTP client, folder the folders they belong to and the files to do not exist. More info: I'm not familiar with these files, I don't believe I have uploaded them. Commented Feb 16, 2021 at 8:02

1 Answer 1


I was able to delete the files via JSON:API (thank god that exists) using Postman.

The FIDs were: 1,2,8,9 - indicating that the files were very early on in the development of the site. I think they may have belonged to article content types that were recently removed (and therefor orphaned) - however I was still able to build the gatsby sites after this.

However, I think it was straight after I deleted the .cache folder from the Gatsby build that I had this issue, so it's possible that I had the images cached, they were then orphaned (during deletion of the 'article' content type.). Although I would have expected that Drupal would have done appropriate deletion of files and records when removing a content type.

  • can you tell me how you deleted the files, i am facing the same issue
    – lordZ3d
    Commented Jan 11, 2022 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.