Right now my page load file size is 350mb... for a website...
The reason is that the gallery is loading in the full size 4000px+ images when they are actually a mere 250px in the page:
Is it possible to display the smallest thumbnail, or even the large image until the user clicks on the image.
I know PHP but I don't know Wordpress, so I would be happy to write this myself if I could understand where to make these changes.
So I would like to change the galleries code to only display thumbnails in this preview view as seen in the photo.
Please see the documentation for https://codex.wordpress.org/Post_Thumbnails. When you're outputting an image, you can set the desired size on several presets.
Relevant code from the documentation below.
// without parameter -> Post Thumbnail (as set by theme using set_post_thumbnail_size())
the_post_thumbnail();
the_post_thumbnail('thumbnail'); // Thumbnail (default 150px x 150px max)
the_post_thumbnail('medium'); // Medium resolution (default 300px x 300px max)
the_post_thumbnail('medium_large'); // Medium Large resolution (default 768px x 0px max)
the_post_thumbnail('large'); // Large resolution (default 1024px x 1024px max)
the_post_thumbnail('full'); // Original image resolution (unmodified)
the_post_thumbnail( array(100,100) ); // Other resolutions