WP Offload Media uses custom table to store CDN URL for media items instead of local URL - how to pull out of graphql? #2708
Unanswered
chris-bullish
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
So I am looking to use WP Offload Media plugin to move the images from the wordpress server to Google Cloud Storage. I have the plugin working with wordpress so far.
My problem is that when you add an image to a block or acf field it stores the location to the bucket in a custom table, referencing the post id (post type as attachment) to the custom table as source id. An example below is using a block with an image. Instead of getting the image url of GCP I get the local image:
post(id: "/your-post-title", idType: SLUG) { title blocks { ... on CoreImageBlock { attributes { ... on CoreImageBlockAttributes { url href } } } } }
I'm not sure what code I need to add in PHP to help graphql know about the custom table?
To illustrate an image is int he post table here
and the post id related to the source id in the wp_as3cf_items table and can use the source path field:
I would like some help in figuring out how to tell graphql to know about the custom table for blocks and acf fields? I had a look at the guides and wasn't too sure how to proceed?
Thanks!
Chris
Beta Was this translation helpful? Give feedback.
All reactions