Commit Graph

1 Commits

Author SHA1 Message Date
Edward Loveall d863cc27a5
Fetch the resized image
Instead of getting the full size image, the image can be fetched with a
width and height parameter so that only the resized data is
transferred. The url looks like this:

https://cdn-images-1.medium.com/fit/c/<width>/<height>/<media-id>

I picked a max image width of 800px. If the image width is more than
that, it scales the width down to 800, then applies that ratio to the
height. If it's smaller than that, the image is displayed as the
original.
2021-07-05 14:56:10 -04:00