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.

Responsive images (handle multiple image sizes & resolutions)

See original GitHub issue

Here are some ideas to improve how we handle images, that I had while thinking about #478:

Handling multiple image resolutions

The web has a standard that we could draw on to handle multiple image resolutions: the srcset and sizes attributes. Might this be useful to, for example, output a smaller PDF for screen than for print?

~Upgrade from isomorphic-fetch and alias fetch~

(separated out to #486)

~Also it might be good to take the opportunity to upgrade to cross-fetch which seems to be better maintained than isomorphic-fetch. We could alias fetch to cross-fetch at the same time:~

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DuncanMacWebcommented, Feb 11, 2019

@diegomura thanks! I’ve replied over at #486… so let’s change this issue to cover the multiple image resolutions / responsive images only.

1reaction
diegomuracommented, Feb 11, 2019

I just did the cross-fetch changes in a separate PR. Hope you don’t mind.

That change is great, specially because cross-fetch solves some issues un React Native that isomorphic-fetch, for future RN integration.

I kind of needed this change before moving forward with #485, so I can now have better (and fastest) tests using jest-fetch-mock

Read more comments on GitHub >

github_iconTop Results From Across the Web

Responsive images - Learn web development | MDN
In this article, we'll learn about the concept of responsive images — images that work well on devices with widely differing screen sizes, ......
Read more >
Responsive Images Done Right: A Guide To <picture> And ...
The sizes attribute tells the browser how many pixels it needs by describing the final rendered width of our image. Think of sizes...
Read more >
How to deliver responsive images across multiple devices
How to deliver responsive images across multiple devices · The viewport dimensions. Whether the viewport is 1280px wide or 640px or 320px ·...
Read more >
Responsive Images: Different Techniques and Tactics
Device pixel-based method: This approach allows you to use multiple versions of the same image with different resolutions and choose the most ...
Read more >
Responsive Images: If you're just changing resolutions, use ...
I am convinced that the plugin needs to be changed, and will make that fix shortly! Only thing left to decide is how...
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