-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add serializer to block to handle Images from sanity #400
Comments
@safejace would you mind explaining a bit how you were able to do so? I'm trying for SanityContent to work with images in body but I still have only an empty tag |
hmmm i don't see it in my code right now, but it would look something like this: CmsContent.vue
MyImage.vue
|
@safejace Thanks for a quick response :). But the sanitizer like that doesn't work. I'm also not sure exactly how it works. so the sanitizer props should detect the root tag of the provided component and if it's an img it would replace all images inside conted with the provided component? I do have
In my nuxt.config.ts |
not sure if it was a typo... but you are saying from the module doc: https://sanity.nuxtjs.org/helpers/portable-text#example-with-custom-serializers
that sounds correct. the |
Describe the solution you'd like to see
The SanityContent component should be able to render images from sanity
Describe alternatives you've considered
Currently i solved it by adding custom serializer
The text was updated successfully, but these errors were encountered: