asImageSrc is not a function error

Hi, I want to use asImageSrc function to make my images blurred while loading.
I was trying to implement the function according to those documents mentioned Imgix using:

  1. Configure the Image Field - Prismic
  2. @prismicio/helpers Technical Reference - Prismic

I have installed @prismicio/helpers - v2 in my project. But I still got error when I called asImageSrc function.

What else should I deal with this situation? Did I missed anything in my implementation?

Hello, @kelly_ke

Thanks for reaching out to us.

It should work if you have installed @prismicio/helpers - v2. Could you delete node modules and install them again?

If it still doesn't work, I'd need your project details. You can send me a private message.


Hi @Priyanka ,

I uninstalled the @prismicio/helpers - v2 package and reinstalled it. Didn't get error anymore. I can reach the asImageSrc function normally. Thanks for your solution!

FYI, my @prismicio/helpers - v2 was upgraded from version ^2.0.0 to ^2.3.1

Hello @kelly_ke

I am glad that It worked for you. ^2.3.1 is the latest version of @prismicio/helpers - v2.