Properly sized images for web are critical to speed, performance, and ranking for SEO (as part of Google Pagespeed scores). Here's what you need to know.
This isn’t your Pinterest style recipe page with the backstory of how our mom taught us how to optimize images during the fall of 1999. Let’s dive right in.
How to Optimize Images
Follow these steps before uploading a new image to your website to insure quality and lightning-fast performance.
Make a duplicate copy of your original image. This will be your web-only version to optimize.
Rename your file. No more than five words, all lowercase, connected by hyphens. Ex: best-file-naming-structure.jpg. This format is good for SEO.
Resize the image to 2000px to 3000px in width, let the height automatically scale to that width.
Save the new size.
Run through this file compressor: Tiny PNG. If you’re preparing multiple photos, save this step until you’ve finished so you can bulk upload to the compressor.
Done! It’s ready for uploading to the site.
Turning It Up a Notch
The above steps are good for shooting from the hip while in the midst of work.
In theory, Google really likes to see your regular image assets (PNG or JPEG) in Webp format.
They even have their own tool for this called Squoosh.
We Build Our Sites with a Default Webp Converter
Every Top Hat WordPress website developed 2024 and beyond has a Webp converter and Tiny PNG optimizer integration built right into the Media Library.
Ok, Now Why Do This
Large image files slow down your entire site load
When the browser triggers the page, it has to seek and download all of the images. If you have a slew of them that are too big, this is going to wreck your load times.
Which leads to user experience issues
This ultimately will slow down pages, and make those pages load slower. This is a detriment to user experience.
And Causes Google to Ding You
It’s no secret that Google is heavily relying on its Google Pagespeed tool to evaluate rankings.
If you run your site through it, you’ll quickly notice a penalty on oversized images on your total score.
These contribute to your overall ranking ability.
New project? Question? Compliment? Let’s chat. New project? Question? Compliment? Let’s chat.
{"head":"<!-- Google Tag Manager -->\r\n<script>\r\n (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\r\n new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\r\n j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\r\n 'https:\/\/www.googletagmanager.com\/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\r\n })(window,document,'script','dataLayer','GTM-WMDNFKPG');\r\n<\/script>\r\n<!-- End Google Tag Manager -->","body":"<!-- Google Tag Manager (noscript) -->\r\n<noscript><iframe src=\u201chttps:\/\/www.googletagmanager.com\/ns.html?id=GTM-WMDNFKPG\u201d\r\nheight=\u201c0\" width=\u201c0\u201d style=\u201cdisplay:none;visibility:hidden\u201d><\/iframe><\/noscript>\r\n<!-- End Google Tag Manager (noscript) -->","footer":"<script>\r\n(function(){\r\n\r\n var JOURNEY_KEY = 'th_lead_journey_v1';\r\n var MAX_PAGES = 20;\r\n\r\n function uuid(){\r\n if (crypto.randomUUID) {\r\n return crypto.randomUUID();\r\n }\r\n\r\n return 'th_' + Date.now() + '_' + Math.random().toString(36).substr(2);\r\n }\r\n\r\n function getJourney(){\r\n try{\r\n return JSON.parse(localStorage.getItem(JOURNEY_KEY));\r\n }catch(e){\r\n return null;\r\n }\r\n }\r\n\r\n function saveJourney(journey){\r\n localStorage.setItem(JOURNEY_KEY, JSON.stringify(journey));\r\n }\r\n\r\n function getUTMs(){\r\n var params = new URLSearchParams(location.search);\r\n var utm = {};\r\n\r\n [\r\n 'utm_source',\r\n 'utm_medium',\r\n 'utm_campaign',\r\n 'utm_term',\r\n 'utm_content',\r\n 'gclid',\r\n 'gbraid',\r\n 'wbraid',\r\n 'fbclid'\r\n ].forEach(function(key){\r\n if(params.has(key)){\r\n utm[key] = params.get(key);\r\n }\r\n });\r\n\r\n return utm;\r\n }\r\n\r\n var journey = getJourney();\r\n\r\n if(!journey){\r\n\r\n journey = {\r\n session_id: uuid(),\r\n started: new Date().toISOString(),\r\n landing_page: location.href,\r\n landing_path: location.pathname,\r\n referrer: document.referrer,\r\n utm: getUTMs(),\r\n pages: []\r\n };\r\n\r\n }\r\n\r\n var last = journey.pages[journey.pages.length - 1];\r\n\r\n if(!last || last.url !== location.href){\r\n\r\n journey.pages.push({\r\n url: location.href,\r\n path: location.pathname,\r\n title: document.title,\r\n timestamp: new Date().toISOString()\r\n });\r\n\r\n if(journey.pages.length > MAX_PAGES){\r\n journey.pages.shift();\r\n }\r\n\r\n }\r\n\r\n saveJourney(journey);\r\n\r\n function populate(){\r\n\r\n document.querySelectorAll('form').forEach(function(form){\r\n\r\n set(form,'lead_session_id',journey.session_id);\r\n set(form,'lead_landing_page',journey.landing_page);\r\n set(form,'lead_journey_json',JSON.stringify(journey));\r\n set(form,'lead_journey',buildSummary());\r\n\r\n });\r\n\r\n }\r\n\r\n function set(form,name,value){\r\n\r\n var field = form.querySelector('[name=\"'+name+'\"]');\r\n\r\n if(!field){\r\n field = document.createElement('input');\r\n field.type = 'hidden';\r\n field.name = name;\r\n form.appendChild(field);\r\n }\r\n\r\n field.value = value;\r\n }\r\n\r\n function buildSummary(){\r\n\r\n var out = [];\r\n\r\n out.push('Landing: ' + journey.landing_page);\r\n out.push('');\r\n\r\n journey.pages.forEach(function(page,i){\r\n out.push((i+1) + '. ' + page.path);\r\n });\r\n\r\n return out.join(\"n\");\r\n\r\n }\r\n\r\n populate();\r\n\r\n document.addEventListener('wpcf7beforesubmit', populate);\r\n\r\n})();\r\n<\/script>"}
We use cookies
We use necessary cookies to make this site work. With your consent, we also use analytics and advertising technologies to improve the site and measure marketing.