question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gatsby Remark Images ignores embedded pixel density of an image

See original GitHub issue

Description

According to documentation the pixel density of a processed image should be retained, but it’s not. Images in 144×144 resolution are displayed in twice the size they were intended to be displayed as a result.

Steps to reproduce

The issue is currently present on Gatsby’s own demo site for Remark: https://using-remark.gatsbyjs.org/responsive-images-and-iframes/#what-about-retina-images

For reference, I found old snapshot from 2017 that renders the image in question properly: https://deploy-preview-1987--using-remark.netlify.com/responsive-images-and-iframes/#what-about-retina-images

Expected result

Retina images should be displayed in their intended size (scaled to resolution).

Actual result

Retina images are displayed in their natural pixel size.

Environment

  System:
    OS: macOS 10.15.2
    CPU: (8) x64 Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
    npm: 6.13.4 - ~/.nvm/versions/node/v12.13.1/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 79.0.3945.88
    Firefox: 71.0
    Safari: 13.0.4
  npmPackages:
    gatsby: ^2.18.16 => 2.18.16
    gatsby-image: ^2.2.37 => 2.2.37
    gatsby-plugin-manifest: ^2.2.34 => 2.2.34
    gatsby-plugin-mdx: ^1.0.64 => 1.0.64
    gatsby-plugin-offline: ^3.0.30 => 3.0.30
    gatsby-plugin-react-helmet: ^3.1.18 => 3.1.18
    gatsby-plugin-sharp: ^2.3.10 => 2.3.10
    gatsby-plugin-styled-components: ^3.1.16 => 3.1.16
    gatsby-plugin-typescript: ^2.1.23 => 2.1.23
    gatsby-remark-images: ^3.1.39 => 3.1.39
    gatsby-remark-unwrap-images: ^1.0.1 => 1.0.1
    gatsby-source-filesystem: ^2.1.43 => 2.1.43
    gatsby-transformer-sharp: ^2.3.9 => 2.3.9
  npmGlobalPackages:
    gatsby-cli: 2.8.21

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
sidharthachatterjeecommented, Jan 23, 2020

@ichik Hmm, you’re right. This looks like a regression.

I’ll take a look at this and get this fixed.

1reaction
LekoArtscommented, Jan 10, 2022

Hi!

I’m closing this as a stale issue as in the meantime Gatsby 4 and related packages were released. You can check our Framework Version Support Page to see which versions currently receive active support.

Please try the mentioned issue on the latest version (using the next tag) and if you still see this problem, open a new bug report. It must include a minimal reproduction.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

lgenzelis/gatsby-remark-images
gatsby -remark-images Processes images in markdown so they can be used in the ... Analyze images' pixel density to make decisions about target...
Read more >
Gatsby markdown-remark-images are not shown
I create content by markdown files, which works . I wanna have images within my content by using markdown syntax ![My Image](./myImage.png) ....
Read more >
Gatsby Changelog | 5.3.0
gatsby-plugin-utils; gatsby-remark-images. There will be no API-breaking changes, your builds will continue to work. However, whenever you use the ...
Read more >
Unified Gatsby Remark Test - EdPike365
Hello World: The remark Kitchen Sink; Responsive Image and IFrames ... Gatsby takes care to retain images' pixel density.
Read more >
gatsby-plugin-sharp | Yarn - Package Manager
Exposes several image processing functions built on the Sharp image processing library. This is a low-level helper plugin generally used by other Gatsby...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found