How to disable automatic Gatsby styles for images? #32953
Unanswered
kolstadmagnus
asked this question in
Help
Replies: 1 comment 2 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey!
I want my images to be about twice as wide as my paragraphs and to be centered on the page (example). By default, images on the starter-blog template go inside
<p>
tags. I therefore installed the plug-insgatsby-remark-unwrap-images
andgatsby-remark-figure-caption
to be able to target the images differently.This does change how the images are wrapped. I now have figures with figcaptions instead of images inside paragraphs (with no captions). Yet I’m not getting the result I want—the figures aren’t any wider than the paragraphs.
I know I’ve styled
figure
andfigure img
correctly (I’ve styled in the same-ish way as I did in the example):I assume there must be something Gatsby’s plug-ins are doing in my HTML. There appears to be two sets of
<span>
s as well as a bunch of styling.Here’s a complete figure now:
This is what I want my figure to be like:
How do I change/disable Gatsby’s styling and
span
tags? GraphQL?gatsby-config.js
? Or is there a different solution?I’m using the Gatsby starter-blog-template.
Any help is much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions