简体   繁体   中英

Images from wp-page larger than the max width (Wordpress - Graphql - Gatsby)

I have always had problems bringing in the images from wordpress via gatsby with graphql (

      <div
        dangerouslySetInnerHTML={{
          __html: page.html,
        }}
      />

)

This new error is the image is coming in from wordpress at full size. Which is HUGE lol

Do I need to edit SCSS or is this a wordpress issue?

image

Do I need to edit SCSS or is this a wordpress issue?

It is not an error per se , and it's not certainly a WordPress issue, since the image is being fetched and retrieved properly. It's a simple CSS (or SCSS) issue where the images are unstyled.

You can simply target them by adding a class name to the div and adding the corresponding CSS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM