defold / asset-portal

List of Defold assets, libraries and extensions
179 stars 35 forks source link

Reduce image sizes #228

Open mikatuo opened 2 weeks ago

mikatuo commented 2 weeks ago

Current images folder in the repo is a bit too large. Not sure if there are specific requirements for the images as far as their width & height are concerned. Probably a simple solution would be to compress existing images manually and then have requirements for new images to be "no more than X by X pixels" and "no more than X KB"?

image

which makes https://defold.com/assets/ page to be slow to load

image

In my specific case I would like to download the entire repo https://github.com/defold/asset-portal/archive/master.zip which is not feasible for my use case as the master.zip is ~50 MB so it takes quite some time. So as a workaround I have to download each .json file one by one (~260 of them) which could be slow as well.

mikatuo commented 2 weeks ago

Related to https://github.com/defold/defold.github.io/issues/24

AGulev commented 1 week ago

I made a couple of changes:

AGulev commented 1 week ago

Maybe it's not perfect but almost twice better. CleanShot 2024-11-10 at 11 11 31@2x

britzl commented 1 week ago

We should also set images to loading="lazy" but this requires changing from <div background to <img. I will look into this.

britzl commented 1 week ago

I will look into this.

https://github.com/defold/defold.github.io/commit/6de395fb063d9dbbcbccf2f5b2141e2a26e13c11

AGulev commented 1 week ago

I will look into this.

defold/defold.github.io@6de395f

works for me:

https://github.com/user-attachments/assets/102ae679-8bf6-4cc7-9f6c-255bb26c48e1