Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-22-2019, 04:26 PM
scottkoz20 scottkoz20 is offline
 
Join Date: Dec 2015
Location: Lewiston, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Dumb question time- CSS Sprites

Ok, as much as I have learned over the last several years running my site, I cannot figure out for the life of me what a CSS Sprite does... I'm sorry if sound ignorant about this, but I am trying to figure this out (and how this can help with improving my site speed)

Thanks,
Scott
Reply With Quote
  #2  
Old 08-22-2019, 04:39 PM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In short sprites allow for countless images to be on one "sprite sheet" which saves bandwith and loading time. Since sprites are typically also not raster images but vector images they can be displayed at any size or any color using CSS.

Having said that they are considerably more complex to design and code. Fortunately there are free programs that do this for you. Or take png or gif images and transform them for you.
Reply With Quote
  #3  
Old 08-22-2019, 06:31 PM
scottkoz20 scottkoz20 is offline
 
Join Date: Dec 2015
Location: Lewiston, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by In Omnibus View Post
In short sprites allow for countless images to be on one "sprite sheet" which saves bandwith and loading time. Since sprites are typically also not raster images but vector images they can be displayed at any size or any color using CSS.

Having said that they are considerably more complex to design and code. Fortunately there are free programs that do this for you. Or take png or gif images and transform them for you.
so I could take the forum images, put them on a single file and then have css call in the images as an image map?
Reply With Quote
  #4  
Old 08-22-2019, 07:07 PM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by scottkoz20 View Post
so I could take the forum images, put them on a single file and then have css call in the images as an image map?
Technically you could but sprite sheets work best with smaller images since you have to map the coordinates for each image. They also work best with images that load with every page load since the idea is to save the amount of data required to load with each page.

vBulletin 5 makes good use of sprites for their default images. One complaint has been that it's a lot harder to change the default forum icons because they are now sprites instead of individual png images.

Like everything, there are always positives and negatives. With so much use being on mobile devices now most things are designed with "mobile first" in mind, meaning saving data whenever and wherever possible. But mobile devices have advanced so rapidly that saving data isn't as big an issue as it once was. 5G loads pages from a phone just as quickly as it loads them from a desktop with a cable connection.

I've only glanced at your forums once or twice and only specifically in relation to questions you've asked but if I recall correctly you have a sports card forum, meaning you have thousands of images. You wouldn't want to to try to convert them all to sprites. The time and effort involved in that would far outweigh any potential benefits.
Reply With Quote
  #5  
Old 08-23-2019, 01:18 AM
scottkoz20 scottkoz20 is offline
 
Join Date: Dec 2015
Location: Lewiston, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

something that I did do already is shrink the png file sizes that are used on the site at this point based on something I read from Final Kaoss (hat tip). But I am really getting into lighthouse to see how I can work on the performance of the site.

Thanks for the information. Good knowledge to have.
Reply With Quote
  #6  
Old 08-23-2019, 06:00 AM
In Omnibus's Avatar
In Omnibus In Omnibus is offline
 
Join Date: Apr 2010
Location: Inside A Blade Server
Posts: 840
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by scottkoz20 View Post
something that I did do already is shrink the png file sizes that are used on the site at this point based on something I read from Final Kaoss (hat tip). But I am really getting into lighthouse to see how I can work on the performance of the site.

Thanks for the information. Good knowledge to have.
To me the biggest issue with using something less than a good DPI png or TIFF image on your site is that it would be hard to tell the grades of the cards. Obviously, the higher quality the image the easier it is to tell if a card has any kind of visible damage. Maybe no one is selling a Honus Wagner or a Mantle rookie but people are still paying good money for what they can see. If they get something different from what they can see it's not good.
Reply With Quote
  #7  
Old 08-23-2019, 10:49 AM
scottkoz20 scottkoz20 is offline
 
Join Date: Dec 2015
Location: Lewiston, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Something that I know we have done on the non-vBulletin elements is lazy loading of images... I need to see if a mod exists for lazy loading of images on the forums...

Thank you much
Reply With Quote
  #8  
Old 08-23-2019, 03:33 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by scottkoz20 View Post
Something that I know we have done on the non-vBulletin elements is lazy loading of images... I need to see if a mod exists for lazy loading of images on the forums...

Thank you much
Yep there is one, here
https://vborg.vbsupport.ru/showthread.php?t=259302
Reply With Quote
  #9  
Old 08-23-2019, 03:56 PM
scottkoz20 scottkoz20 is offline
 
Join Date: Dec 2015
Location: Lewiston, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by final kaoss View Post
I saw this but in reading, I saw comments that this is not needed? I'll try it out regardless


edit: with different sources of where the images are coming from, I doubt this is going to do what I thought
Reply With Quote
  #10  
Old 08-23-2019, 08:10 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks like the developer said that it can lazy load external images.

Quote:
Lazy Load will delay the loading of images outside of viewpoint to make the page load faster.
This should help you decide if you want to incorporate it or not.

Quote:
Why lazy load images or video instead of just loading them?
Because it's possible you're loading stuff the user may never see. This is problematic for a couple reasons:

It wastes data. On unmetered connections, this isn't the worst thing that could happen (although you could be using that precious bandwidth for downloading other resources that are indeed going to be seen by the user). On limited data plans, however, loading stuff the user never sees could effectively be a waste of their money.
It wastes processing time, battery, and other system resources. After a media resource is downloaded, the browser must decode it and render its content in the viewport.
When we lazy load images and video, we reduce initial page load time, initial page weight, and system resource usage, all of which have positive impacts on performance. In this guide, we'll cover some techniques and offer guidance for lazy loading images and video, as well as a short list of some commonly used libraries.
https://developers.google.com/web/fu...ges-and-video/
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:44 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04444 seconds
  • Memory Usage 2,259KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete