© 1998 PhotoSpin
Average page is 1795 KB

in size and growing
WordPress sites are worse
In Finland: WordPress sites
average 2,5 MB
Page size matters
Page size

does not matter

(that much)
Page size

≠

page performance
Page performance
≠
server-side performance
PRACTICAL TIPS
Optimize images
Optimize images for
users automatically
Never use the original sizes
of uploaded images
Prevent users using

the full size image
There is a filter for that
function h1_remove_full_image_size( $sizes ) {
unset( $sizes['full'] );
return $sizes;
}
add_fil...
Don’t load images

a.k.a. lazy loading
Make browsers

cache resources
Minimize,

combine,
compress
Minimize,

combine,
compress
Minimize,

combine,
compress
Minimize,

combine,
compress
Advanced stuff
Move scripts
to bottom
…with WP Simple
Asset Optimizer
Moving scripts
add_filter( 'wpsao_move', function () {
return array(
'jquery_json',
'gform_placeholder',
'gform_gravityfor...
Inline CSS and
JavaScript
Inlining
add_filter( 'wpsao_inline', function () {
return array(
'modernizr',
'h1-stylesheet' => array(
'replace' => '../....
Topics skipped: CDNs, responsive and retina
images, continuous performance measurement,
inlining images, CSS sprites, serv...
Thanks!
@akibjorklund
Go to akibjorklund.com/wcfi2015

to get all the links mentioned in this talk.
WordCamp Finland 2015, Page performance optimization
WordCamp Finland 2015, Page performance optimization
WordCamp Finland 2015, Page performance optimization
WordCamp Finland 2015, Page performance optimization
Upcoming SlideShare
Loading in …5
×

WordCamp Finland 2015, Page performance optimization

996 views

Published on

How to optimize WordPress pages on Google PageSpeed Insights and in general.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
996
On SlideShare
0
From Embeds
0
Number of Embeds
692
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

WordCamp Finland 2015, Page performance optimization

  1. 1. © 1998 PhotoSpin
  2. 2. Average page is 1795 KB
 in size and growing
  3. 3. WordPress sites are worse
  4. 4. In Finland: WordPress sites average 2,5 MB
  5. 5. Page size matters
  6. 6. Page size
 does not matter
 (that much)
  7. 7. Page size
 ≠
 page performance
  8. 8. Page performance ≠ server-side performance
  9. 9. PRACTICAL TIPS
  10. 10. Optimize images
  11. 11. Optimize images for users automatically
  12. 12. Never use the original sizes of uploaded images
  13. 13. Prevent users using
 the full size image
  14. 14. There is a filter for that function h1_remove_full_image_size( $sizes ) { unset( $sizes['full'] ); return $sizes; } add_filter( 'image_size_names_choose', 'h1_remove_full_image_size' );
  15. 15. Don’t load images
 a.k.a. lazy loading
  16. 16. Make browsers
 cache resources
  17. 17. Minimize,
 combine, compress
  18. 18. Minimize,
 combine, compress
  19. 19. Minimize,
 combine, compress
  20. 20. Minimize,
 combine, compress
  21. 21. Advanced stuff
  22. 22. Move scripts to bottom
  23. 23. …with WP Simple Asset Optimizer
  24. 24. Moving scripts add_filter( 'wpsao_move', function () { return array( 'jquery_json', 'gform_placeholder', 'gform_gravityforms', 'optin-monster-api-script', 'wp-mediaelement', 'visualizer-google-jsapi', 'visualizer-render' ); } );
  25. 25. Inline CSS and JavaScript
  26. 26. Inlining add_filter( 'wpsao_inline', function () { return array( 'modernizr', 'h1-stylesheet' => array( 'replace' => '../../', 'with' => get_template_directory_uri() . '/assets/' ) ); } );
  27. 27. Topics skipped: CDNs, responsive and retina images, continuous performance measurement, inlining images, CSS sprites, server side optimization, prioritizing visible content, avoiding redirects, DNS, asynchronous JavaScript, HTTP2…
  28. 28. Thanks! @akibjorklund Go to akibjorklund.com/wcfi2015
 to get all the links mentioned in this talk.

×