Entrance Chat Gallery Guilds Search Everyone Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
December 23, 2025 - @555.02 (what is this?)
Activity rating: Two Stars Posts & Arts: 22/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts Start New Topic  Submit Art
News: :4u: Love is not possession  :4u: Guild Events: There are no events!

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  how do you quickly load images in a gallery?


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


⛺︎ My Room

Guild Memberships:
Artifacts:
Joined 2025!
« on: December 14, 2025 @929.09 »

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 ProfileArt


Here be dragons
⛺︎ My Room

Artifacts:
Great Posts PacmanThanks for being rad!First 1000 Members!Joined 2023!
« Reply #1 on: December 16, 2025 @12.21 »

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

rolypolyphonic
Jr. Member ⚓︎
**
View Profile WWWArt


The Non-Living World's first and cutest prophet
⛺︎ My Room
StatusCafe: rolypolyphonic
Itch.io: My Games
RSS: RSS

Guild Memberships:
Artifacts:
Joined 2025!
« Reply #2 on: December 16, 2025 @329.51 »

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


My projects:

Bread, and all variations of the aforementioned - a hypertext multimedia webcomic series about a sentient Doll and the End of the World
Bien, and the Antivirus of the Apocalypse - novella about how an Undead Demon spent their Time [sic] in an underground bunker guided by the Voice of Reality after a metaphysical War
Daydream Attorney - a coagulation of spectres dedicated to turning schizotypy into the world's first viral mind disease
aswestos
Newbie ⚓︎
*
View Profile WWWArt


⛺︎ My Room

Guild Memberships:
Artifacts:
Joined 2025!
« Reply #3 on: December 16, 2025 @390.59 »


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
Sr. Member ⚓︎
****
View Profile WWWArt


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

Guild Memberships:
Artifacts:
I met Dan Q on Melonland!
« Reply #4 on: December 16, 2025 @443.72 »

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


Artifact Swap: I met Dan Q on Melonland!PolyamorousJoined 2025!Derp DoggoLurby
aswestos
Newbie ⚓︎
*
View Profile WWWArt


⛺︎ My Room

Guild Memberships:
Artifacts:
Joined 2025!
« Reply #5 on: December 16, 2025 @628.45 »


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: December 16, 2025 @634.69 by aswestos » Logged

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

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | ~ Send Feedback ~ 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