Swag-for-dev: Optimize images

Created on 1 Oct 2018  路  7Comments  路  Source: swapagarwal/swag-for-dev

Images take too long to load on slower networks!
They can be compressed and stored on the server itself, instead of loading it every time from different servers.

enhancement good first issue

Most helpful comment

I'd be pleased to fix this if you haven't already did it!

We could download these images from the gulp pipeline and then rebuild a modified version of data.json to be used by the website. It would allow us to keep original reference to the image in the data.json inside the repo and only edit this json file.

In the future, the README.md could also be generated from this unique json file.

What do you think?

All 7 comments

TL;DR Add images under assets and update the links in data.json

Hotlinking can be an issue too (though ideally shouldn't be). The source of the image should also be captioned, IMHO.

Nope. We don't have such high traffic right now for hotlinking to be an issue. It's more about images being large (300KB for example)! Source of the image would almost always be present in the reference link so we can omit that.

Ah alright!

I'd be pleased to fix this if you haven't already did it!

We could download these images from the gulp pipeline and then rebuild a modified version of data.json to be used by the website. It would allow us to keep original reference to the image in the data.json inside the repo and only edit this json file.

In the future, the README.md could also be generated from this unique json file.

What do you think?

Sure, go ahead @aslafy-z!

Great! I'll have to embed the data.json file into the netlify build to make it work. It will also speed-up the thing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

swapagarwal picture swapagarwal  路  4Comments

plibither8 picture plibither8  路  5Comments

vmr1532 picture vmr1532  路  5Comments

swapagarwal picture swapagarwal  路  7Comments

aslafy-z picture aslafy-z  路  5Comments