Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 4 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[HOW TO - VB4 + VBSEO] Site Optimization: Easily Specify Image Dimensions
Lazorbeam
Join Date: Aug 2010
Posts: 169

 

Show Printable Version Email this Page Subscription
Lazorbeam Lazorbeam is offline 01-12-2012, 11:00 PM

One of the high-impact criteria of a fast web page is whether image dimensions have been specified in html or not. Without image dimensions, web browsers must "reflow" and "repaint" the image once it is reloaded.

The problem is that specifying image dimensions can be tedious. One would be required to edit each template and insert dimensions manually. To make matters worst, there are hundreds (if not thousands) of images in vbulletin, some of which aren't even used. Conventionally, one could run a get image sizes script to pull all images and respective dimensions from vbulletin. This method returns thousands of results, most of which are images with no need to be optimized.

I found a very easy solution using VBSEO. If you don't use VBSEO, this article won't be of much help.
  1. Open up 3 instances of GTmetrix.com.
  2. The first should point to your CMS (if applicable), the 2nd to your forum root, and the third to any PUBLICLY viewable thread.
  3. GTmetrix then grades your site speed against several criteria.
  4. Click on the "specify image dimensions" criteria. Odds are you scored 0 on this.
  5. A list of images come up for each instance of GTmetrix. These are the images that load up on your most popular pages (CMS, FORUMHOME and SHOWTHREAD). You can use GTmetrix to find images on other pages, if you wish, like blogs etc.
  6. Copy paste each list of images into notepad and make sure there are no duplicates.
  7. Log into VBSEO.
  8. Navigate to VBSEO "Other Enhancements" and click on "Image Size Attributes".
  9. Select "Yes". Paste the list of images from your clipboard.
  10. Next, you have to format the list so that VBSEO can understand it. It's relatively simple. For example http://www.example.com/forum/images/smile.png (Dimensions: 728 x 90) would become 'smile.png'=>'728x90'
  11. Note: if you have multiple styles with the same image in each, this will work so long as the image has the same dimensions. Otherwise you will screw up your style.
  12. Note2: Be careful with avatars and other resized images, since they can appear in various sizes throughout your forum. You shouldn't be specifying dimensions for these.
  13. Run GTmetrix to make sure the image dimensions no longer need to be specified.

I haven't figured out how to do google adsense and external images with this method yet.

And that's it! You're done.
Reply With Quote
  #2  
Old 01-18-2012, 05:59 PM
garybrun garybrun is offline
 
Join Date: Nov 2011
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks you for this.
Im looking into it now.
Reply With Quote
  #3  
Old 01-22-2012, 01:51 AM
kitawanita kitawanita is offline
 
Join Date: Jun 2011
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Lazorbeam,
I"m using another folder to place my image .ex : http://example.com/newfolder/smile.png
How to write the path in vbseo?
Thanks for any help and sorry for bad english.
Reply With Quote
  #4  
Old 01-23-2012, 11:54 AM
Lazorbeam Lazorbeam is offline
 
Join Date: Aug 2010
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kitawanita View Post
Hi Lazorbeam,
I"m using another folder to place my image .ex : http://example.com/newfolder/smile.png
How to write the path in vbseo?
Thanks for any help and sorry for bad english.
You don't have to write a path unless the image name is used in another folder. Example:

http://example.com/newfolder/smile.png
http://example.com/smile.png

You would have to include the path for the images above. Otherwise it's simply /newfolder/smile.png
Reply With Quote
  #5  
Old 01-28-2012, 09:26 AM
kitawanita kitawanita is offline
 
Join Date: Jun 2011
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok,it works.Thanks
Reply With Quote
  #6  
Old 01-30-2012, 01:30 AM
FReeSTER FReeSTER is offline
 
Join Date: Jun 2006
Location: Rome
Posts: 730
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is a great tutorial mate
ty
Reply With Quote
  #7  
Old 01-31-2012, 09:45 AM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great... i will try this after installing vBSEO today ISA
thanks
Reply With Quote
  #8  
Old 09-30-2012, 08:24 PM
Mark_Zuckerberg Mark_Zuckerberg is offline
 
Join Date: Sep 2011
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I f not having vbseo then what to do in vb 4.2
Reply With Quote
  #9  
Old 02-25-2013, 05:38 PM
Dorgham's Avatar
Dorgham Dorgham is offline
 
Join Date: May 2012
Location: Egypt
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I also do not have vbseo
Reply With Quote
  #10  
Old 02-27-2013, 02:52 PM
watershed's Avatar
watershed watershed is offline
 
Join Date: Feb 2012
Location: Budapest, Hungary
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have used this and managed to remove some of the images from the list, yet i'm still getting an F (0) result for this test.

Some of the files I hadn't removed were avatars/avatar thumbnails (As instructed). I've also not managed to specify sizes of files which do not sit on my website.

Any idea as to why this is?

I can give you my url in private to have a look if you want

Thanks!
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 10:42 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04402 seconds
  • Memory Usage 2,291KB
  • Queries Executed 23 (?)
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)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (8)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • 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