Closed jfrank-nih closed 2 weeks ago
responsive-image: No real way to replicate this with other tags leave as-is. But are we able to remove the
image-with-caption: these changes should be fine
image-with-class: I'd say use the second option (pdate
picture-with-quotes : we could rig something like this up; obviously it would be easier if we didn't need it to replicate what this does and simplified rendering
Closing because PCP has moved to the digital platform.
Issue description
We currently have multiple different image inclusion methods.
image-with-caption
: ImageWithCaptionimage-with-class
: ImageWithClasspicture-with-quotes
: PictureWithQuotesresponsive-image
: ResponsiveImageI'd like to simplify this to:
We'll create a documentation page on how to use them in combination with each other to get the results we want. Changes we make should look substantially similar to current formats but don't have to be identical.
We should also move off of gatsby-image, which is deprecated, to gatsby-plugin-image. See also #219.
What's the proposed change?
image-with-caption
: gatsby-remark-images plugin has attributesshowCaptions
andmarkdownCaptions
that can take a title input and use it as the caption. (Docs, example) We'd just need to style the caption to match current code. Then we could just use the markdown in the content.image-with-class
: We could either...<div class="X/Y/Z">
around the markdown image tag, or<image-with-class>
to have theclassName
attribute but instead ofsrc
andalt
it would just wrap around the standard markdown syntax. That would allow it to be used with the caption syntax easily as well.picture-with-quotes
is only used in a few early blogs. Can we somehow use the other styles to replicate it? Maybe an<image-with-class>
tag and a markdown caption combined? The look does not have to be exactly what we currently have.responsive-image
: No real way to replicate this with other tags leave as-is. But are we able to remove the<div>
around it without introducing any problems?