{"id":386,"date":"2017-05-20T00:45:54","date_gmt":"2017-05-19T22:45:54","guid":{"rendered":"http:\/\/themanual.local\/?p=386"},"modified":"2023-09-07T09:55:10","modified_gmt":"2023-09-07T07:55:10","slug":"images-and-optimisation","status":"publish","type":"post","link":"https:\/\/simonbarnett.co.za\/themanual\/images-and-optimisation\/","title":{"rendered":"Images and Optimisation"},"content":{"rendered":"\n<h2>Overview<\/h2>\nThe reasons for optimising are at the end.<br>\nThe steps here cover the following:\n<ol>\n<li>Correct file formats for the web.<\/li>\n<li>Correct pixel dimensions for your website.<\/li>\n<li>Smallest file size.<\/li>\n<\/ol>\n<p>* There&#8217;s a tutorial <a href=\"http:\/\/simonbarnett.co.za\/themanual\/using-apple-preview-resize-photos\/\">here<\/a> for people with Macs who don&#8217;t have Photoshop.<\/p>\n<hr>\n<h2>The Tips<\/h2>\n<p>Here are the main tips in brief. There are only two and a half tips, so we&#8217;re talking really brief.<\/p>\n\t<h4>File formats<\/h4>\n<p>With little exception (gif, svg), the only file formats for web worth considering are jpg and png.<\/p>\n<p>The general rule is: jpeg photos, png logos.<\/p>\n<p>To expand on that slightly:<\/p>\n<h5><strong>JPEG Photos<\/strong><\/h5>\n<p>Pictures of people and things should be in jpg format.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/simonbarnett.co.za\/themanual\/wp-content\/uploads\/2017\/05\/IMG_0206-768x576.jpg\" alt=\"\" width=\"320\" height=\"240\"><\/p>\n<h5><strong>PNG Logos<\/strong><\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/simonbarnett.co.za\/themanual\/wp-content\/uploads\/2017\/05\/WordPress_blue_logo.svg_-768x768.png\" alt=\"\" width=\"123\" height=\"123\">Logos and other vector graphics &#8211; ie. images with hard-edged graphical elements &#8211; should be in png format.<\/p>\n<p>In addition, logo and graphic vector-based images should be at twice their intended size in pixels (4x by area) to account for retina screens.<\/p>\n<hr>\n<h4>Exceptions<\/h4>\n<h5>Text over a Photo<\/h5>\nIf you want a photo with overlaid text it&#8217;s best to lay it out on the website by using a jpg pic as the background image to a row or column, then type the text into a module.<br>\nIt&#8217;s best not to do your text as part of the image, but if you really have to, then png is the format to use for combined photos and text.\n<h5>Deep Etched Items<\/h5>\n<p>For product shots and similarly singular and distinct photos of objects, free of their backgrounds, you&#8217;ll need a file format with transparency, and that&#8217;s <strong>png<\/strong>.<\/p>\n<p>(There&#8217;s a new format from Google which handles photos, hard edges, and transparency, all at smaller file sizes &#8211; <a href=\"https:\/\/developers.google.com\/speed\/webp\/\" target=\"_blank\" rel=\"noopener\">WebP<\/a>&nbsp;&#8211; but it&#8217;s not well-supported as yet).<\/p>\n\t<h4>Pixel Size: Imsanity<\/h4>\n<p>I would normally advise an upper limit on image size, which would be a unique number based on the width of your specific website, but I&#8217;ve got you covered.<\/p>\n<p>I always install a size-limiting plugin called <a href=\"https:\/\/wordpress.org\/plugins\/imsanity\/\" target=\"_blank\" rel=\"noopener\">Imsanity<\/a> (as in Image Insanity) on the websites I build.<\/p>\n<p>This plugin automatically limits the maximum image size which I set based on your website requirements. This prevents overloading the website by uploading huge images.<\/p>\n<p>However perhaps you have huuuge images which would take a long time to upload, and besides, resizing them first is advisable in any case, which I&#8217;ll explain in the next tip. In that case as a general rule, here&#8217;s the width that will cover most websites:<\/p>\n<blockquote>\n<h5>1366px<\/h5>\n<\/blockquote>\n\t<h4>File Size \/ Compression<\/h4>\n<p>Both types of image should be compressed as much as possible without losing quality.<\/p>\n<p>This tip is more of a rule, and you should always make this the last step in your workflow before uploading the image to WordPress:<\/p>\n<ul>\n<li>Run images through <a href=\"https:\/\/imageoptim.com\/mac\" target=\"_blank\" rel=\"noopener noreferrer\">ImageOptim<\/a><\/li>\n<\/ul>\n<hr>\n<h5>Important note<\/h5>\n<p>Running your images through ImageOptim should be the <strong>last<\/strong> step.<\/p>\n<p>If you do any work on an image in another program you&#8217;ll be working with an image that&#8217;s been pushed to limits of being reduced.<\/p>\n<p>When you save it again it will likely have artifacts &#8211; noticeable effects from having been over-processed.<\/p>\n<p>Your workflow should be:<\/p>\n<ol>\n<li>Download photo from camera or other source<\/li>\n<li>Do color corrections and add effects etc<\/li>\n<li>Optional: Save a backup in a layered format (like .psd)<\/li>\n<li>Resize down (never up) and crop<\/li>\n<li>Save the final version of the image<\/li>\n<li>Run through ImageOptim<\/li>\n<li>Upload to WordPress<\/li>\n<\/ol>\n<hr>\n<h5><strong>Temporary Note<\/strong><\/h5>\n<p>(before I do a proper job on this rush-addendum)<\/p>\n<p>These are my ImageOptim preferences, which I think I set ages ago. Apparently &#8211; according to clients &#8211; they differ from the default settings, and are pretty effective.<\/p>\nI&#8217;ll look into exactly where they differ, and update this with the exact settings later, but for now, here are some screenshots.<br>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/simonbarnett.co.za\/themanual\/wp-content\/uploads\/2017\/05\/ImageOptim-General.png\" alt=\"\" width=\"561\" height=\"369\"><br>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/simonbarnett.co.za\/themanual\/wp-content\/uploads\/2017\/05\/ImageOptim-Quality.png\" alt=\"\" width=\"563\" height=\"370\"><br>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/simonbarnett.co.za\/themanual\/wp-content\/uploads\/2017\/05\/ImageOptim-Level.png\" alt=\"\" width=\"568\" height=\"374\">\n\t<h2>Why Optimise?<\/h2>\n<p>Website performance &#8211; namely the ability of a website to load quickly &#8211; is crucial for many reasons. Here are the two most important ones, related as they are:<\/p>\n<h3>1. User experience<\/h3>\n<p>Firstly, a new visitor to your website will not wait around for the page to load. They will simply leave, and not come back.<\/p>\n<h3>2. Search Engine Optimisation (SEO)<\/h3>\n<p>Secondly, Google, and other search engines do not like slow websites, mainly for the first reason.<\/p>\n<p>After all, search engines are in the business of ranking websites based on whether it is worth visiting them, so they will give slow loading websites a poor rank, meaning the website will not appear near the top of search results.<\/p>\n<p>Website speed is the top ranking factor. Think of it this way: in an extreme example, a website that is so slow as to not load at all may as well not exist, in which case why should a search engine even list it?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Follow these easy practices, and your website will fly..<\/p>\n","protected":false},"author":1,"featured_media":1847,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,10,6],"tags":[20,19,17],"class_list":["post-386","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general-advice","category-specific-instruction","category-content-manager","tag-imageoptim","tag-preview-app","tag-wordpress"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/simonbarnett.co.za\/themanual\/wp-json\/wp\/v2\/posts\/386","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/simonbarnett.co.za\/themanual\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/simonbarnett.co.za\/themanual\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/simonbarnett.co.za\/themanual\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/simonbarnett.co.za\/themanual\/wp-json\/wp\/v2\/comments?post=386"}],"version-history":[{"count":0,"href":"https:\/\/simonbarnett.co.za\/themanual\/wp-json\/wp\/v2\/posts\/386\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/simonbarnett.co.za\/themanual\/wp-json\/wp\/v2\/media\/1847"}],"wp:attachment":[{"href":"https:\/\/simonbarnett.co.za\/themanual\/wp-json\/wp\/v2\/media?parent=386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simonbarnett.co.za\/themanual\/wp-json\/wp\/v2\/categories?post=386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simonbarnett.co.za\/themanual\/wp-json\/wp\/v2\/tags?post=386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}