You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 18, 2023. It is now read-only.
I have photos in PortableText in Sanity. I have created a component that handles lazy load and creates a placeholder that is displayed while the image loads.
To make the placeholder have the same size as the image, I need metadata from the image. I can do this if I create my own image field. But when the image is inserted into PortableText and via the sanity-blocks-vue component, I do not get sent with parameters so I can get this metadata.
Is it possible to get the sanity-blocks-vue component to retrieve metadata about the image? If so, how do I do it?
The text was updated successfully, but these errors were encountered:
I have dug a little more into the setup and see that the solution with Gridsome (which is the static page generator I use) and Sanity comes using Vue 2 and that it is version 0.1.0 that is used by sanity-blocks-vue-component.
I do not notice that it was such an old version and that 1.0.1 is for Vue 3. I assume I can use the legacy version. But am unsure what the imageOptions object should look like.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have photos in PortableText in Sanity. I have created a component that handles lazy load and creates a placeholder that is displayed while the image loads.
To make the placeholder have the same size as the image, I need metadata from the image. I can do this if I create my own image field. But when the image is inserted into PortableText and via the sanity-blocks-vue component, I do not get sent with parameters so I can get this metadata.
Is it possible to get the sanity-blocks-vue component to retrieve metadata about the image? If so, how do I do it?
The text was updated successfully, but these errors were encountered: