0

I'm trying to render image field in Sitecore JSS as below.

import React from 'react';
import { Text, Link, Image, RichText } from '@sitecore-jss/sitecore-jss-react';

const HeroBanner = ({ fields }) => (
<div className="hero-banner">
    <Image media={fields.BannerImage} />
</div>
);

export default HeroBanner;

I had a look at JSON data and I could see BannerImage field value but I am getting below exception enter image description here

Environment Details

  • Sitecore 9.1 initial version
  • Sitecore JavaScript Services Server for Sitecore 9.1 XP 11.0.0 rev. 181031.zip

Any help would be appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.