Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
Autumn, 20 Oct 2026 - @188.18
Forum Activity: Two Stars Random | Recent Posts | Guild Recents
News: :cry: Are u having fun? Guild Events: Weekly zine jam 17: Fashion
Super News: ~~MelonLand's Halloween Profile Design Contest 2026~~
+  MelonLand Forum
|-+  Da Web Revival
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  how do you quickly load images in a gallery?


« previous next »
Pages: [1] Print Embed
Author Topic: how do you quickly load images in a gallery?  (Read 1304 times)
aswestos
Newbie
*
View Profile WWWArt


⛺︎ My Room

Guild Memberships:
Artifacts:
Joined 2025!
« on: Winter, 14 Dec 2025 @929 » Toggle Font Embed

I am trying to make an image gallery (you can view it here) and a lot of my drawings are an insane size and i don't want to sacrifice the quality of my images and while i admit, some of them are huge, but i wish to have the images load faster. I have already compressed the png's but i still feel like it could load faster. am I going insane? how could i do better? I am a beginner in web development. all criticism is constructive. I am welcoming anything you feel can make my gallery better.

Logged

:transport::melon:
ThunderPerfectWitchcraft
Hero Member ⚓︎
*****
View Profile WWWArt


Here be dragons
⛺︎ My Room

Artifacts:
Visited on Melon's 10th Anniversary!I got robbed by Dan Q on Melonland!Great Posts PacmanThanks for being rad!First 1000 Members!Joined 2023!
« Reply #1 on: Winter, 16 Dec 2025 @012 » Embed

Either use thumbnails with a reduced size and load the full sized image only on expansion, or consider changing the format to webp (which should be smaller without noticeable quality loss).

Logged

Memory
Guest

« Reply #2 on: Winter, 16 Dec 2025 @330 » Embed

I noticed some of your images are 2700+ px wide; that's pretty big for web viewing. I would suggest shrinking them down (For comics or anything with text, I would consider 900px to be the smallest advisable size; but I would say around 700-1200px is a good width for online viewing).

A lot of people don't like WEBP, but I find that it really shrinks down on file size a lot without compressing the images or getting rid of transparency if any. I use BIRME to bulk-resize and convert images to WEBP.

Alternatively, you could also convert your images to JPEG. Depending on what software you use, there are options to convert to JPEG without those typical JPEG artifacts/'pixellisation' usually associated with the format.

Logged
aswestos
Newbie
*
View Profile WWWArt


⛺︎ My Room

Guild Memberships:
Artifacts:
Joined 2025!
« Reply #3 on: Winter, 16 Dec 2025 @391 » Toggle Font Embed


Alternatively, you could also convert your images to JPEG. Depending on what software you use, there are options to convert to JPEG without those typical JPEG artifacts/'pixellisation' usually associated with the format.

Because this seems to be the easiest thing to do at 2 am after waking up in the middle of the night and remembering i want to improve my load speeds before i forgot again, i would say not to horrible of results. i timed it to be roughly 20 seconds for the full gallery. i'll try out the web, something files here when i fully wake up.

I just use photoshop so im very familiar with the vanilla file types


Logged

:transport::melon:
Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
Artifacts:
The Worm is creeping around Melonland profiles!Dan Q Cruisin'I DIDN'T meet Dan Q on Melonland!Visited on Melon's 10th Anniversary!
« Reply #4 on: Winter, 16 Dec 2025 @444 » Toggle Font Embed

I am trying to make an image gallery (you can view it here) and a lot of my drawings are an insane size and i don't want to sacrifice the quality of my images and while i admit, some of them are huge, but i wish to have the images load faster. I have already compressed the png's but i still feel like it could load faster. am I going insane? how could i do better? I am a beginner in web development. all criticism is constructive. I am welcoming anything you feel can make my gallery better.

As I think others have said: the single biggest problem is you're using the full-size images both for "displaying the full size image", and for "displaying a thumbnail".

Here's what I'd change:

1. In the "column" of images, don't use the full size images. Make (much) smaller resized thumbnails (lower resolution, higher compression) of each, and use those.
2. Keep the URL of the "full" version of each image somewhere accessible: I'd add it into a data-attribute of each <img>, e.g. <img src="/pictures/ahwell-thumbnail.jpg" data-full-src="/pictures/ahwell.jpg" alt="Ah! Well. Go to Hell." onclick="myFunction(this);">, where ahwell-thumbnail.jpg is the tiny, fast-loading version!
3. Update your JS code so that it uses the data- attribute instead of the src when loading the expandedImg. I.e. instead of expandImg.src = imgs.src;, something like expandImg.src = imgs.dataset.fullSrc;.

I've knocked up an example in a CodePen for you. I didn't want to make thumbnails of your actual images, so I've used placeholder images for now, but you'll hopefully make sense.

Logged

https://danq.me/_q26t/badges/dan-q-88x31-lighter.gif https://danq.me/_q26t/badges/dan-q-88x31-peekaboo-scroller.gif https://beige-buttons.danq.dev/beige-buttons-88x31.gif https://embed-html.danq.dev/embed-html-88x31.gif https://origami.danq.dev/88x31.gif

Artifact Swap: PolyamorousI met Dan Q on Melonland!Joined 2025!
aswestos
Newbie
*
View Profile WWWArt


⛺︎ My Room

Guild Memberships:
Artifacts:
Joined 2025!
« Reply #5 on: Winter, 16 Dec 2025 @628 » Toggle Font Embed


I've knocked up an example in a CodePen for you. I didn't want to make thumbnails of your actual images, so I've used placeholder images for now, but you'll hopefully make sense.

omg Dan,  :loved: thank you so much, i'm a beginner with js, i can read it but i really don't know how to implement it well. i just started summer this year.
I like this code pen site as well. it really makes it easy to work on things rather than pinging it through the worldwideweb and clearing cache and... (who would of thought theres good resources for this stuff![ :ha: ]) i'll def start using it! especially for practice.

« Last Edit: Winter, 16 Dec 2025 @635 by aswestos » Logged

:transport::melon:
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
@000 Melon
Land
Forum Art Hub Chat Webring Explore Random Recent Tenement Arcade Want to Login or Join ? Web Craft Guide Graphic Catalogue Wiki Help I'm Lost! Link Land Newsletters Image Stream Minecraft: Online
Zap!
Passport Sites tamaNOTchi Asatte Add your site?
Aero Archive Onio Cafe 32 Bit Cafe Status Cafe