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

Querying core image block - missing dimensions fields #147

Open
eliawk opened this issue May 16, 2022 · 3 comments
Open

Querying core image block - missing dimensions fields #147

eliawk opened this issue May 16, 2022 · 3 comments

Comments

@eliawk
Copy link

eliawk commented May 16, 2022

Hello,
when I query the image block like this:

... on CoreImageBlock {
      attributes {
        ... on CoreImageBlockAttributes {
          url
          width
          height
          className
          sizeSlug
          caption
        }
      }
    }

I can't get dimensions fields (width and height) as you see form the screenshot:
Schermata 2022-05-16 alle 17 48 19

could you please help me fix this?

@sahandnayebaziz
Copy link

I am also seeing an issue where core/image is returning the wrong URL (it's still showing my WP url, where it should be showing an S3 url since I use offload-media and all of the WP UI shows me the media urls with the S3 prefix).

Could these be related? Maybe the metadata of images isn't being forwarded totally correctly?

@brianpereradap
Copy link

I'm also having the same issue. Any luck finding a workaround?

@theianjones
Copy link

@eliawk you have to edit the dimensions in the editor to get this to work. I created a new block that got the naturalHeight and naturalWidth from the image. Its odd that the core block doesnt have this be default.

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

No branches or pull requests

4 participants