-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gatsby-remark-images] gif and svg images aren't recognized/rendered #7317
Comments
Was just looking through the source code for
|
Yeah correct. You'll want to add https://www.gatsbyjs.org/packages/gatsby-remark-copy-linked-files/?=copy- in addition to gatsby-remark-images. gatsby-remark-images is just for resizing images and since we can't resize gif or svgs, those aren't handled. |
Thanks @KyleAMathews 👍 |
Copies additional blog posts to Gastby version. When copying a blog post with gifs, I found that `gatsby-remark-images` does not coy over gifs (or svgs) because the cannot (or do not need to be) optimized: gatsbyjs/gatsby#7317 As per the suggestion, this commit also adds `gatsby-remark-copy-linked-files` which will copy over gifs and render them. Also, this commit slightly edits the "Using Vim to Drive TDD" post to remove a link that was broken (using an old HipChat link).
The Gatsby doc didn't mention anything about using the |
I'm dealing with this issue as well.
will be turned into something like
no difference in this part to show the image correctly, you need to ensure the path is right (images/a.gif in this case) |
Same proble for me. Gif isn´t recognized on MD file. MD file: ---
title: 'Overview'
description: 'OpenCV-Flow Overview'
---
![OpenCV-Flow](./assets/overview.gif)
![OpenCV-Flow](./assets/overview.webp) Images tag ouput: <img src="./assets/overview.gif" alt="OpenCV-Flow" class="css-0" />
<img class="gatsby-resp-image-image css-0" alt="OpenCV-Flow" title="OpenCV-Flow"
src="/static/d1e767a8c2e243e4e7a0e25df4abc4ca/e88ff/overview.webp"
srcset="
/static/d1e767a8c2e243e4e7a0e25df4abc4ca/eb777/overview.webp 176w,
/static/d1e767a8c2e243e4e7a0e25df4abc4ca/edd59/overview.webp 352w,
/static/d1e767a8c2e243e4e7a0e25df4abc4ca/e88ff/overview.webp 600w
"
sizes="(max-width: 600px) 100vw, 600px"
loading="lazy" /> Note that in the first case Gatsby copied the same path from the MD code and because of that it did not display the image. |
Description
I'm trying to use
gatsby-remark-images
to display images from my markdown files.png
works finegif
andsvg
don't seem to be recognized.Steps to reproduce
Expected result
All image types render correctly
Actual result
Environment
File contents (if changed)
gatsby-config.js
:package.json
:gatsby-node.js
: N/Agatsby-browser.js
: N/Agatsby-ssr.js
: N/AThe text was updated successfully, but these errors were encountered: