/* WP-Cache Config Sample File See wp-cache.php for author details. */ $wpsc_last_post_update = 1507500483; //Added by WP-Cache Manager $wp_cache_slash_check = 1; //Added by WP-Cache Manager if ( ! defined('WPCACHEHOME') ) define( 'WPCACHEHOME', WP_CONTENT_DIR . "/plugins/wp-super-cache/" ); //Added by WP-Cache Manager $cache_compression = 1; //Added by WP-Cache Manager $cache_enabled = true; //Added by WP-Cache Manager $super_cache_enabled = true; //Added by WP-Cache Manager $cache_max_time = 600; //Added by WP-Cache Manager //$use_flock = true; // Set it true or false if you know what to use $cache_path = WP_CONTENT_DIR . '/cache/'; $file_prefix = 'wp-cache-'; // We want to be able to identify each blog in a WordPress MU install $blogcacheid = ''; if( defined( 'VHOST' ) ) { $blogcacheid = 'blog'; // main blog if( constant( 'VHOST' ) == 'yes' ) { $blogcacheid = $_SERVER['HTTP_HOST']; } else { $request_uri = preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', str_replace( '..', '', $_SERVER['REQUEST_URI'] ) ); if( strpos( $request_uri, '/', 1 ) ) { if( $base == '/' ) { $blogcacheid = substr( $request_uri, 1, strpos( $request_uri, '/', 1 ) - 1 ); } else { $blogcacheid = str_replace( $base, '', $request_uri ); $blogcacheid = substr( $blogcacheid, 0, strpos( $blogcacheid, '/', 1 ) ); } if ( '/' == substr($blogcacheid, -1)) $blogcacheid = substr($blogcacheid, 0, -1); } $blogcacheid = str_replace( '/', '', $blogcacheid ); } } // Array of files that have 'wp-' but should still be cached $cache_acceptable_files = array( 'wp-comments-popup.php', 'wp-links-opml.php', 'wp-locations.php' ); $cache_rejected_uri = array('wp-.*\\.php', 'index\\.php'); $cache_rejected_user_agent = array ( 0 => 'bot', 1 => 'ia_archive', 2 => 'slurp', 3 => 'crawl', 4 => 'spider', 5 => 'Yandex' ); $cache_rebuild_files = 1; //Added by WP-Cache Manager // Disable the file locking system. // If you are experiencing problems with clearing or creating cache files // uncommenting this may help. $wp_cache_shutdown_gc = 0; $wp_super_cache_late_init = 0; // uncomment the next line to enable advanced debugging features $wp_super_cache_advanced_debug = 0; $wp_super_cache_front_page_text = ''; $wp_super_cache_front_page_clear = 0; $wp_super_cache_front_page_check = 0; $wp_super_cache_front_page_notification = '0'; $wp_cache_object_cache = 0; //Added by WP-Cache Manager $wp_cache_anon_only = 0; $wp_supercache_cache_list = 0; //Added by WP-Cache Manager $wp_cache_debug_to_file = 0; $wp_super_cache_debug = 0; $wp_cache_debug_level = 5; $wp_cache_debug_ip = ''; $wp_cache_debug_log = ''; $wp_cache_debug_email = ''; $wp_cache_pages[ "search" ] = 0; $wp_cache_pages[ "feed" ] = 0; $wp_cache_pages[ "category" ] = 0; $wp_cache_pages[ "home" ] = 0; $wp_cache_pages[ "frontpage" ] = 0; $wp_cache_pages[ "tag" ] = 0; $wp_cache_pages[ "archives" ] = 0; $wp_cache_pages[ "pages" ] = 0; $wp_cache_pages[ "single" ] = 0; $wp_cache_hide_donation = 0; $wp_cache_not_logged_in = 0; //Added by WP-Cache Manager $wp_cache_clear_on_post_edit = 1; //Added by WP-Cache Manager $wp_cache_hello_world = 0; //Added by WP-Cache Manager $wp_cache_mobile_enabled = 0; //Added by WP-Cache Manager $wp_cache_cron_check = 1; //Added by WP-Cache Manager ?> /* WP-Cache Config Sample File See wp-cache.php for author details. */ $wpsc_last_post_update = 1507500483; //Added by WP-Cache Manager $wp_cache_slash_check = 1; //Added by WP-Cache Manager if ( ! defined('WPCACHEHOME') ) define( 'WPCACHEHOME', WP_CONTENT_DIR . "/plugins/wp-super-cache/" ); //Added by WP-Cache Manager $cache_compression = 1; //Added by WP-Cache Manager $cache_enabled = true; //Added by WP-Cache Manager $super_cache_enabled = true; //Added by WP-Cache Manager $cache_max_time = 600; //Added by WP-Cache Manager //$use_flock = true; // Set it true or false if you know what to use $cache_path = WP_CONTENT_DIR . '/cache/'; $file_prefix = 'wp-cache-'; // We want to be able to identify each blog in a WordPress MU install $blogcacheid = ''; if( defined( 'VHOST' ) ) { $blogcacheid = 'blog'; // main blog if( constant( 'VHOST' ) == 'yes' ) { $blogcacheid = $_SERVER['HTTP_HOST']; } else { $request_uri = preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', str_replace( '..', '', $_SERVER['REQUEST_URI'] ) ); if( strpos( $request_uri, '/', 1 ) ) { if( $base == '/' ) { $blogcacheid = substr( $request_uri, 1, strpos( $request_uri, '/', 1 ) - 1 ); } else { $blogcacheid = str_replace( $base, '', $request_uri ); $blogcacheid = substr( $blogcacheid, 0, strpos( $blogcacheid, '/', 1 ) ); } if ( '/' == substr($blogcacheid, -1)) $blogcacheid = substr($blogcacheid, 0, -1); } $blogcacheid = str_replace( '/', '', $blogcacheid ); } } // Array of files that have 'wp-' but should still be cached $cache_acceptable_files = array( 'wp-comments-popup.php', 'wp-links-opml.php', 'wp-locations.php' ); $cache_rejected_uri = array('wp-.*\\.php', 'index\\.php'); $cache_rejected_user_agent = array ( 0 => 'bot', 1 => 'ia_archive', 2 => 'slurp', 3 => 'crawl', 4 => 'spider', 5 => 'Yandex' ); $cache_rebuild_files = 1; //Added by WP-Cache Manager // Disable the file locking system. // If you are experiencing problems with clearing or creating cache files // uncommenting this may help. $wp_cache_shutdown_gc = 0; $wp_super_cache_late_init = 0; // uncomment the next line to enable advanced debugging features $wp_super_cache_advanced_debug = 0; $wp_super_cache_front_page_text = ''; $wp_super_cache_front_page_clear = 0; $wp_super_cache_front_page_check = 0; $wp_super_cache_front_page_notification = '0'; $wp_cache_object_cache = 0; //Added by WP-Cache Manager $wp_cache_anon_only = 0; $wp_supercache_cache_list = 0; //Added by WP-Cache Manager $wp_cache_debug_to_file = 0; $wp_super_cache_debug = 0; $wp_cache_debug_level = 5; $wp_cache_debug_ip = ''; $wp_cache_debug_log = ''; $wp_cache_debug_email = ''; $wp_cache_pages[ "search" ] = 0; $wp_cache_pages[ "feed" ] = 0; $wp_cache_pages[ "category" ] = 0; $wp_cache_pages[ "home" ] = 0; $wp_cache_pages[ "frontpage" ] = 0; $wp_cache_pages[ "tag" ] = 0; $wp_cache_pages[ "archives" ] = 0; $wp_cache_pages[ "pages" ] = 0; $wp_cache_pages[ "single" ] = 0; $wp_cache_hide_donation = 0; $wp_cache_not_logged_in = 0; //Added by WP-Cache Manager $wp_cache_clear_on_post_edit = 1; //Added by WP-Cache Manager $wp_cache_hello_world = 0; //Added by WP-Cache Manager $wp_cache_mobile_enabled = 0; //Added by WP-Cache Manager $wp_cache_cron_check = 1; //Added by WP-Cache Manager ?> How To Edit Images On Joomla | Joomla Bear Blog How To Edit Images On Joomla – Joomla Bear Blog

How To Edit Images On Joomla

I just wanted to make some notes about editing images for the web. A few users have had trouble with it. And I often take what I know for granted, because I deal with these things on a daily bases. So it may be basic for some of you, but hopefully someone finds it useful.

Joomla!’s media manager doesn’t do much in the way of image editing, none in fact. It’s not facebook. You’re expected to upload images at the correct width and height. And its up to you to control the file size of the image. Even if it did manipulate images for us, its still good to know a little about the different image types, especially if you’re maintaining a website.

A few of our users have been uploading 500Kb PNG images for articles. That’s about half a MB or the size of a small Youtube clip. Not ideal for an article. Years ago when internet speeds were slower, Gerben Hoekstra was recommending that file sizes shouldn’t exceed 25Kb http://www.weballey.net/html/plaatjes.html He has some practical advise for beginners and is responsible for getting me into HTML before XHTML came out. He also said you should only use JPG or GIF file types, because not all browsers supported PNG. This was because Microsoft’s Internet Explorer 6 (IE 6) couldn’t support the transparency of the PNG (when all other browsers could). PNG can actually be a great file type, when used for the right graphic. I might get into that in another article though. And at the time of Gerben writing that I think IE6 was at its peak usage. Thankfully things are changing, last month its use was down to 7% on the w3schools site http://www.w3schools.com/browsers/browsers_stats.asp (also a great learning place).

File Size
So Internet speeds have increased, but its important to remember not everyone is on a high speed connection. And in some countries (including NZ) some home users don’t understand the point for broadband. So we’re dealing with a range of internet speeds. And as I’m sure Gerben would agree, even on high speed connections, page load is still important. Not only is it the users page load we’re concerned about but also server strain. If your site suddenly gets a burst of traffic you don’t want the server to crash, and stop the free publicity you’re receiving. And with services like Facebook, Digg, Twitter, Stumbleupon, any site can potentially experience these peaks. So you want to be prepared.

You can check the size of a file on Windows, Ubuntu (I assume Mac as well) by right clicking on the file, and select the properties option at the very bottom. A pop up appears with seemingly useless info. There are three major uses I have for this.

  1. Is the Size value, indicating how much space the file/image takes up on the computer. And in the web world indicates how long its going to take to transfer from the server to the users browser.
  2. The Created value, lets you know when the file/image was made.
  3. And “Type of file” lets you know if the image is JPEG (the web short hands this to JPG), PNG or GIF.

You should also be able to right click on an image in your browser, and similar options should come up. This will differ depending on the browser you use.

Number Of Images On A Page
Yes the obvious one is the more images on one page, the more data there is to transfer, making the page load slower. But its not just the combined image file size we’re worried about. The amount of images does matter, because modern bowers limit themselves in the number of requests the can make to one server at one time. That might be a mouthful to take in, but think of it like you can only carry 10 bricks at one time, after you’ve dealt with those heavy bricks you can then start to think about the next 10.  With 30 images on a page, the browser can only think about the first 10 before thinking about next 10. For a standard article, I’d try and keep image usage to around 5 (if I’m lucky to have 5 images on the topic). There are exceptions. Either the page is an image gallery of some kind, in which case the user should be aware they’re going to an image gallery, and hopfully prepared to wait. Or it’s a long instructional article where 30+ images are required to illustrate how to do something, again the user shouldn’t mind waiting for this.

There are advanced techniques for those of you who want it. Lazy loading images seems to be all the rage at the moment http://en.wikipedia.org/wiki/Lazy_loading If you Google Lazy Load you should find some Javascript libraries that do this for you. Lazy loading loads the images when the screen space of the image appears on the users screen. So the browser doesn’t have to worry about the images at the bottom of the page unless the user scrolls that far.

I think this article is getting too long to go into file types here. So I’ll wrap up. If you have the commercial software Photoshop, great. The short cut to export for web is Shift + Ctrl + Alt + S you’ll then be able to select your file type and see the file size before you save. If you don’t have Photoshop  but want to get into making you page load more efficient, and become a better web publisher, then use Gimp! I found it a little harder to learn than Photoshop, but that may be because I’m used to using Photoshop. Its free open source like Joomla! compatible on most operating systems http://www.gimp.org/ There is enough documentation to publish a small book, and translated into many languages http://www.gimp.org/docs/ And these days it capabilities are phenomenal, it can do 90% of what Photoshop can do.

If you can learn to effectively save images you might help SEO your site as Google will be soon (if not all ready) be factoring the page load of a sites into the influencing factors.

I hope that was useful. There is quite a bit in the way of images. I might continue on in another post 🙂

2 Comments

 Add your comment
  1. Great job !!! really clears up a few problems , and some really good tips ! again Thanks !!

Leave a Comment

Your email address will not be published.