I have PDFs in my WordPress media library that I'd like to download and serve from the Gatsby site. Everything works in development mode, but when building for production, wpMediaItem comes back null on PDF files.
The query execution succeeds without errors, but the result that comes back in production mode is:
{
list: null,
merchant: null
}
Image queries still seem to work fine, it's only PDF files. Could it be that the plugin assumes all media files are images and is trying to compress/optimize them?
I have PDFs in my WordPress media library that I'd like to download and serve from the Gatsby site. Everything works in development mode, but when building for production,
wpMediaItem
comes back null on PDF files.Here is my query:
The query execution succeeds without errors, but the result that comes back in production mode is:
Image queries still seem to work fine, it's only PDF files. Could it be that the plugin assumes all media files are images and is trying to compress/optimize them?