How to Get the Most Out of Smush

Optimizing your images manually would involve a lot of resizing, a fair bit of coding, and heaps of time. Luckily, Smush does all the hard work for you and plenty more besides, all of which you will find covered in this guide to help you get the most out of the plugin.

Smush offers an abundance of features to help you get your images under control.

For example, whilst Smush may be best-known for compressing images (without losing quality), it can also help defer your offscreen images with its lazy-load feature, convert your images to next-gen formats (WebP), and serve your images from our super-fast CDN.

Luckily, you don’t need to dedicate much time or effort to your images when you have Smush installed. Most features can be activated with one click.

Whether you’re a new user or just hoping to uncover some cool features you might have missed, this guide will help you get the most out of this plugin.

We look at how to:

So without further ado, here’s how to get the most out of Smush:

1. Smush All Your Images in Bulk

When you first install Smush, chances are you’ll have a backlog of images that need your attention.

The Bulk Smush feature scans your site for any images that would benefit from being compressed.

Screenshot of the bulk smush feature which shows 7 images which need smushing.
Each time you add new images, Smush will add them to this total.

All you have to do is click the button – Smush does all the hard work for you and lets you know when the job is complete.

Screenshot showing the bulk smush successfully completed.
Much faster than compressing them yourself.

You can exclude certain image sizes from Bulk Smush if required. However, as Smush compresses without sacrificing quality, it may be beneficial to smush them all.

Screenshot of the various image sizes which are available to exclude.
Remove the ticks from the images sizes you want to exclude from being compressed.

2. Automatically Compress New Uploads

Once you have used the Bulk Smush feature to catch up on your backlog of image compressing, you will seldom need to use it again.

This is because of the handy Automatic Compression feature. If you enable this, Smush will compress images as soon as you upload them to your site.

Screenshot showing the various image sizes that you can include when bulk smushing if you didn't want to select 'all'.
The days of routine image pruning can easily be a thing of your past.

3. Super-Smush For Double the Compression

If your main focus is on your site’s speed, you may want to take image compression a step further.

Super-Smush offers twice the compression of regular smushing by stripping out every bit of unneeded data, without reducing the quality of your images.

Screenshot of the super-smush button.
Give it a try – we challenge you to notice a difference in quality!

If you don’t want to take it as far as Super-Smush, you can instead strip the unnecessary metadata from your images, leaving only what is needed for SEO purposes. Photos often store camera settings in the file such as focal length, date, time and location – removing this will reduce your file size.

If you’re a photographer, you might want to keep this information, but it serves little purpose on most sites so is generally safe to remove.

4. Display Your Full Size Images

If you upload an image that is larger than 2560px in either width or height, WordPress will automatically scale it down to generate a ‘web-optimized’ maximum image size.

If you are purposefully adding larger images and want to override this, you can use the image resizing option.

Screenshot of the resize my full size images button
You can set your own new maximum image size.

Bear in mind that your theme may also have its own maximum image size – you will need to check this before enabling this feature.

If you are uploading full-sized images, you can also choose whether or not these will be included in Bulk Smush.

Screenshot of the settings for smushing original images.
Another couple of simple one-click features.

Make sure you enable the bottom selection if you want to store a copy of all your full-size images, in case you ever wanted to return them to their pre-smushed forms.

Learn more about how WordPress handles images by checking out this blog.

5. Convert Your PNGs to JPEGs

There are some circumstances where one of these two file types is more suitable than the other. However, if your main concerns for your site are memory usage and speed, then using JPEGs instead of PNGs should be beneficial.

If you upload your images as PNGs, Smush can check to see whether converting them to JPEGs will reduce the file size.

Screenshot of the png to jpeg button
The files will remain as PNGs if there is no reduction in the file size.

You can, of course, make the same conversion outside of WordPress. However, using Smush removes the hassle and converts all your files in one swoop.

6. Smush From the Media Library

If you would prefer to select individual images for compression, look no further than your own media library.

Here, you will find a new column labelled ‘Smush’.

Screenshot of the column which appears in the media library upon activation of smush.
You can compress your images one-by-one.

If you have auto-compression turned off, any photos which you upload should be ready to smush from within your media library.

You can smush your images individually, or alternatively single out images to be ignored from bulk smushing.

7. Lazy Load Your Images For a Boost of Speed

If you have pages with lots of photos, displaying them all at once can put a lot of pressure on the server.

Deferring your off-screen images is a good way to allow the server to concentrate on loading the elements of your site above the fold so that your visitor can get stuck straight in.

Screenshot of the lazy loading feature activated.
It takes one click to deactivate if you find it’s not right for your site.

If there are certain types of images or certain output locations you wish to exclude from lazy loading, you can easily add them here.

Screenshot of the different media types and output locations you can exclude.
Remove the ticks from any of the options that you don’t wish to include.

You can also exclude certain various post types, specific URLs, and CSS classes and IDs.

Basically, if you want to enable lazy loading, you can fine-tune exactly how and where it is enabled.

Once you have chosen which images will lazy load, you can then decide how you want the pre-loading images to appear.

Screenshot of the display animation options.
If you don’t want any form of animation, simply select ‘None’.

8. Utilize Smush’s CDN

The closer you are to the server that is providing your content, the faster it will load. A CDN (Content Delivery Network) is a series of servers which are spread around the globe, and when a browser makes the HTTP request, the content is served from the closest server to its location.

Smush Pro boasts a 45-point CDN, with a few extra tricks up its sleeve. It can automatically resize your images as well as convert them to Google’s own next-gen format, WebP.

If all you want is for your images to be served from the CDN, you do not need to delve any further into these.

However, there are a few useful tools that can be of benefit to your site, so they are worth checking out.

To activate the Smush Pro Image CDN, From Smush Pro in your websites dashboard, go to the CDN tab and click the blue button.

Screenshot of the CDN just before activation.
Once you have activated the CDN, you will see more options within Smush.

This will store and serve copies of all your JPG, PNG, and Gif images from the Smush edge servers – drastically improving speed.

Don’t Leave Your Background Images Out

As standard, only images used on your posts and pages will be served through the CDN

If you want your background image to be served from the same speedy CDN as the rest of your images, Smush has you covered.

Screenshot of the background images option.
Your background images will reach your visitor quicker if served through our CDN.

You will need to ensure that your background images are properly declared with CSS in your theme’s files.

9. Serve the Correct Image Sizes

Ideally, you should never serve an image larger than what will be displayed on the user’s screen. Using original or full-size images when a smaller image will do makes your pages take longer to load while your browser waits for the images to render.

Smush’s CDN houses a handy feature to resize your image to fit the container, without needing to touch a line of code.

Screenshot of the automatic resizing option.
As the resizing is done from the CDN, your original images will remain full size.

10. Convert Your Images to Next-Gen Formats

JPEG 2000, JPEG XR, and WebP are modern image formats with superior compression capabilities. This means they produce much smaller image files so you can greatly improve your page speed.

Images served in the WebP format can benefit from more than 25% compression, and when you think about the number of images on your site, that’s a tonne of space that can be saved.

Smush’s CDN offers the option to convert your images to WebP in just one click.

Screenshot of the webp conversion button.
All the legwork is taken care of by Smush.

Not all browsers support next-gen formats, which is something you would usually have to bear in mind when deciding to make the switch.

However, if you enable the WebP Conversion feature, Smush will automatically check whether or not a browser supports this format, and if not, will serve it in the original one. This ensures that none of your visitors are compromised.

Support at Your Fingertips

Now you know the ins and outs of this little plugin, it’s time to get stuck in and see how your site can benefit.

Smush is a very user-friendly plugin, so you should have no trouble managing your images.

If, however, you find yourself in need of some friendly advice, members should look no further than our awesome support team who are available 24/7.

You can also check out the plugin documentation and view new updates and features coming soon in our roadmap.

How To Get The Most Out Of Smush Image Optimization

Optimizing your images manually would involve a lot of resizing, a fair bit of coding, and heaps of time. Luckily, Smush does all the hard work for you and plenty more besides, all of which you will find covered in this guide to help you get the most out of the plugin.

For example, while Smush may be best-known for compressing images (without losing quality), it can also help defer your offscreen images with its lazy-load feature, convert your images to next-gen formats (WebP), and serve your images from our super-fast CDN available with Smush Pro.

Luckily, you don’t need to dedicate much time or effort to your images when you have Smush installed. Most features can be activated with one click.

Whether you’re a new user or just hoping to uncover some cool features you might have missed, this guide will help you get the most out of this plugin.

We look at how to:

  1. Smush All Your Images in Bulk
  2. Automatically Compress New Uploads
  3. Super Or Ultra-Smush For Double the Compression
  4. Display Your Full Size Images
  5. Convert Your PNGs to JPEGs
  6. Smush From the Media Library
  7. Optimize Directory Images
  8. Lazy Load Your Images For a Boost of Speed
  9. Utilize Smush’s CDN
  10. Serve the Correct Image Sizes
  11. Convert Your Images to Next-Gen Formats
  12. Save Time With Automatic Smush Configs
  13. Integrate With Popular WordPress Tools

So without further ado, here’s how to get the most out of Smush:

1. Smush All Your Images in Bulk

When you first install Smush, chances are you’ll have a backlog of images that need your attention.

The Bulk Smush feature scans your site for any images that would benefit from being compressed.

Screenshot of the bulk smush feature which shows 31 images which need smushing.
Each time you add new images, Smush will add them to this total.

All you have to do is click the button – Smush does all the hard work for you and lets you know when the job is complete.

If you have a lot of images to optimize, you’re also free to leave the plugin completely and come back to it, Smush will continue to compress your images in the background and you’ll be notified once the process is complete.

But rest assured, no matter how many images you have to optimize, thanks to built-in features like parallel image processing, which gives you 8x the normal processing speed, your images are in the best and fastest hands.

Screenshot showing the bulk smush successfully completed.
Much faster than compressing them yourself.

You can exclude certain image sizes from Bulk Smush if required. However, as Smush compresses without sacrificing quality, it may be beneficial to smush them all.

Screenshot of the various image sizes which are available to exclude.
Remove the ticks from the images sizes you want to exclude from being compressed.

One other feature worth noting is that when you click the Re-Check Images button, Smush performs an automatic scan of your Media Library to check if new images have been added since the last bulk smush.

Media Library Scan
Smush automatically scans your media library when you recheck images.

2. Automatically Compress New Uploads

Once you have used the Bulk Smush feature to catch up on your backlog of image compressing, you will seldom need to use it again.

This is because of the handy Automatic Compression feature. If you enable this, Smush will compress images as soon as you upload them to your site.

Smush also has a generous maximum file size limit of 256MB per image, so if you have any gigantic images to be uploaded, they’ll automatically be compressed and optimized for you too.

Screenshot showing the various image sizes that you can include when bulk smushing if you didn't want to select 'all'.
The days of routine image pruning can easily be a thing of your past.

3. Super Or Ultra-Smush For More Compression

If your main focus is on your site’s speed, you may want to take image compression a step further.

Super-Smush offers twice the compression of regular smushing by stripping out every bit of unneeded data, without reducing the quality of your images.

A screen showing the different Smush modes.
Take your image compression power to the next level.

Or, if you want to really amp up your compression powers, try the Ultra-Smush option for an impressive 5x compression on top of the already amazing Super-Smush. Ultra is only available with Smush Pro, but completely worth the upgrade if having the fastest possible sites is a priority for you.

New Ultra Smush delivers 5x greater image compression than Super Smush!Check it out here

If you don’t want to take it as far as Super or Ultra-Smush, you can instead strip the unnecessary metadata from your images, leaving only what is needed for SEO purposes. Photos often store camera settings in the file such as focal length, date, time and location – removing this will reduce your file size.

If you’re a photographer, you might want to keep this information, but it serves little purpose on most sites so is generally safe to remove.

4. Display Your Full Size Images

If you upload an image that is larger than 2560px in either width or height, WordPress will automatically scale it down to generate a ‘web-optimized’ maximum image size.

If you are purposefully adding larger images and want to override this, you can use the image resizing option.

Screenshot of the resize my full size images button
You can set your own new maximum image size.

Bear in mind that your theme may also have its own maximum image size – you will need to check this before enabling this feature.

Want to disable automatic resizing of images altogether? You can enable Disable scaled images. This means scaled versions of images will not be generated, and only your original uploaded images will be kept.

If you are uploading full-sized images, you can also choose whether or not these will be included in Bulk Smush.

Screenshot of the settings for smushing original images.
Another couple of simple one-click features.

Make sure you enable the Backup original images selection if you want to store a copy of all your full-size images, in case you ever wanted to return them to their pre-smushed forms.

Learn more about how WordPress handles images by checking out this blog post.

5. Convert Your PNGs to JPEGs

There are some circumstances where one of these two file types is more suitable than the other. However, if your main concerns for your site are memory usage and speed, then using JPEGs instead of PNGs should be beneficial.

If you upload your images as PNGs, Smush can check to see whether converting them to JPEGs will reduce the file size.

Screenshot of the png to jpeg button
The files will remain as PNGs if there is no reduction in the file size.

You can, of course, make the same conversion outside of WordPress. However, using Smush removes the hassle and converts all your files in one swoop.

6. Smush From the Media Library

If you would prefer to select individual images for compression, look no further than your own media library.

Here, you will find a new column labelled ‘Smush’.

Screenshot of the column which appears in the media library upon activation of smush.
You can compress your images one-by-one.

If you have auto-compression turned off, any photos which you upload should be ready to smush from within your media library.

You can smush your images individually, or alternatively single out images to be ignored from bulk smushing.

7. Optimize Directory Images

While your uploads folder is typically the main folder where images are found, they may also reside elsewhere in your directory.

For example, plugins that create their own image copies may store those images in the plugins folder.

In cases like this, the Directory Smush feature helps you easily identify and compress images stored outside the uploads folder.

A screen showing the directory Smush feature
Find and optimize images stored outside of the typical uploads folder.

Simply choose which directories and subdirectories you want to scan, and Smush will optimize and compress all of the images in bulk, it’s that easy.

A look at how Smush enables you to scan directories.
Optimize selected directories and subdirectories with a click.

8. Lazy Load Your Images For a Boost of Speed

If you have pages with a lot of images, displaying them all at once can put a lot of pressure on the server.

Deferring your off-screen images is a good way to allow the server to concentrate on loading the elements of your site above the fold so that your visitor can get stuck straight in.

Screenshot of the lazy loading feature activated.
It takes one click to deactivate if you find it’s not right for your site.

If there are certain types of images or certain output locations you wish to exclude from lazy loading, you can easily add them here.

Screenshot of the different media types and output locations you can exclude.
Remove the ticks from any of the options that you don’t wish to include.

You can also exclude certain various post types, specific URLs, and CSS classes and IDs.

Basically, if you want to enable lazy loading, you can fine-tune exactly how and where it is enabled.

Once you have chosen which images will lazy load, you can then decide how you want the pre-loading images to appear.

Screenshot of the display animation options.
If you don’t want any form of animation, simply select ‘None’.

9. Utilize Smush’s CDN

The closer you are to the server that is providing your content, the faster it will load. A CDN (Content Delivery Network) is a series of servers which are spread around the globe, and when a browser makes the HTTP request, the content is served from the closest server to its location.

Smush Pro boasts a 121-point CDN, with a few extra tricks up its sleeve. It can automatically resize your images as well as convert them to Google’s own next-gen format, WebP.

Check out the video below to learn more about our CDN.

If all you want is for your images to be served from the CDN, you do not need to delve any further into these.

However, there are a few useful tools that can be of benefit to your site, so they are worth checking out.

You can activate and configure the Smush Pro Image CDN right from your dashboard.

Screenshot of the CDN just after activation.
Once you have activated the CDN, you will see more options within Smush.

This will store and serve copies of all your JPG, PNG, and Gif images from the Smush edge servers – drastically improving speed.

Don’t Leave Your Background Images Out

As standard, only images used on your posts and pages will be served through the CDN.

If you want your background image to be served from the same speedy CDN as the rest of your images, Smush has you covered.

Screenshot of the background images option.
Your background images will reach your visitor quicker if served through our CDN.

You will need to ensure that your background images are properly declared with CSS in your theme’s files.

10. Serve the Correct Image Sizes

Ideally, you should never serve an image larger than what will be displayed on the user’s screen. Using original or full-size images when a smaller image will do makes your pages take longer to load while your browser waits for the images to render.

Smush’s CDN houses a handy feature to resize your image to fit the container, without needing to touch a line of code.

Screenshot of the automatic resizing option.
As the resizing is done from the CDN, your original images will remain full size.

11. Convert Your Images to Next-Gen Formats

JPEG 2000, JPEG XR, and WebP are modern image formats with superior compression capabilities. This means they produce much smaller image files so you can greatly improve your page speed.

Images served in the WebP format can benefit from more than 25% compression, and when you think about the number of images on your site, that’s a tonne of space that can be saved.

Smush Pro gives you two options for converting your images to next-gen formats.

1.Convert images with Smush Local WebP

The Local WebP feature in Smush Pro enables you to serve images from your Media Library in next-gen WebP format, without needing the Smush CDN.

A screenshot of the LocalWebP feature from the main Smush dashboard
Serve images in next-gen formats without the need for Smush’s CDN.

The conversion to WebP is lossy when converting from JPEG images, and lossless when converting from PNG images.

Note that once you have configured this feature, you will need to run a Bulk Smush again for your existing images to get a WebP version created for each one.

Local WebP also only works for images in your Media Library and cannot create WebP versions of images found in other directories.

2.Convert images with Smush CDN

Smush’s CDN offers the option to convert your images to WebP in just one click.

Screenshot of the webp conversion button.
All the legwork is taken care of by Smush.

Not all browsers support next-gen formats, which is something you would usually have to bear in mind when deciding to make the switch.

However, if you enable the WebP Conversion feature, Smush will automatically check whether or not a browser supports this format, and if not, will serve it in the original one. This ensures that none of your visitors are compromised.

12. Save Time With Automatic Smush Configs

If you manage multiple sites, this feature will save you hours of time by allowing you to apply your preferred Smush settings to any site with a click.

All you have to do is follow the already mentioned steps in this article and set Smush up exactly how you want it.

Then navigate to Settings > Configs and simply hit ‘Save Config’ to save your current settings as a new config, which you can apply to other sites instantly.

A screenshot showing the Smush Configs module
Set up Smush with your ideal settings and apply to other sites with a click.

You can also choose from a number of default configs and you can integrate with The Hub site management tool to easily apply your configs to multiple sites at once.

13. Integrate With Popular WordPress Tools

A screen showing brands that Smush is compatible with
Smush plays nicely with and enhances your favorite WordPress tools.

Smush is fully compatible with your favorite WordPress tools and has direct in-plugin integrations with Gutenberg, Amazon S3, Gravity Forms, WPBakery builder, and NextGen Gallery.

Like most Smush features, all of these integrations can be activated with a click and allow for more specialized and targeted image optimization for the tool you’re integrating with.

Support at Your Fingertips

Now you know the ins and outs of this little plugin, it’s time to get stuck in and see how your site can benefit.

Smush is a very user-friendly plugin, so you should have no trouble managing your images.

If, however, you find yourself in need of some friendly advice, members should look no further than our awesome support team who are available 24/7.

And when you’re ready to take your image optimization to the next level, give Smush Pro a try and automatically unlock advanced features like our 121-point CDN, 5x Ultra Smush – plus – free access to the entire WPMU DEV suite of plugins and site management tools.

You can also check out the plugin documentation and view new updates and features coming soon in our roadmap.

The 10 Useful Networking Commands You Should Know

What is my IP address? Who is the host of this website? Which mail service is this domain using? There exist web tools that can uncover these details but this sort of research can also be done using the command line on your computer.

Network Commands

Let’s explore a few essential networking commands that will help you know everything about a website from the terminal itself.

What is my IP address

curl https://checkip.amazonaws.com

Make a curl or wget request to the checkip.amazonaws.com and it prints the public IP address of your computer. You can also connect to Akamai’s whatismyip.akamai.com domain get your external IP address.

What is my Private IP address

ifconfig en0 | grep inet

Your computer has a private IP address that only work within the local network. For older Macs with a wired Ethernet port, use en0 for Ethernet interface or en1 for the WiFi interface. The networksetup -listnetworkserviceorder command will print a list all network interfaces available on your machine.

Find the Location of IP address

curl https://ip2c.org/?ip=8.8.8.8

The free ‘ip2c’ service resolves an IP address to the country.

Or use the ‘ipapi’ service to get more details of an IP address including the city name, timezone and even the latitude and longitude associated with an IP address.

curl https://ipapi.co/8.8.8.8/json

Check DNS Records

The dig command will help you query for any type of DNS records for a domain from the command line.

1. Find the IP address of a website

dig +short www.labnol.org

2. Find the Mail Server of Domain

The Mail Exchange (MX) records specify the incoming mail servers that used for delivering email messages sent to your domain name.

host -t MX labnol.org

3. Print all DNS Records of a Domain

Get a list of all DNS records of a domain including TXT records, MX records and name servers. The name servers handle queries regarding the location of the domain’s website, email and other services.

dig +nocmd amazon.com any +noall +answer

Who is hosting a website?

Use the dig command to find the IP address of a website and then use the same dig command to perform a reverse lookup to find the host of that IP address.

For instance, this command will print the IP address of the Netflix website:

dig +short netflix.com A | tail -1

Use that IP address in the next command to get the hostname:

dig +nocmd -x 52.11.104.17 +noall +answer

Find the owner of the website

Use the built-in whois command to reveal important information about any web domain including the date when it was first registered, the contact details of the website owner, the expiration date of the domain, the name of the domain registrar and so on.

whois dictation.io

You can also query the domain registration details on a specific registrar’s server with the -h flag. For instance, the next command performs a whois lookup on a website using the WHOIS server of Google Domains.

whois -h whois.google.com reverse.photos

Test Network Connectivity with Ping

The ping command helps you test if a remote host is reachable and whether your machine can connect to it properly.

ping -c 5 -i 2 labnol.org

The above command pings the host 5 time and there’s a 2 second wait between pings.

Where’s the fault?

If your Internet connection is working but you are unable to reach a website, there could be an issue with an intermediate router that the packets have to pass through to reach the server.

The traceroute commands prints the network path from your local computer to the website that the traffic must pass through and this information can be useful for diagnosing connectivity issues.

traceroute labnol.org

Also see: Essential Tools for Developers

9 Top Solar APIs

The Sun, that great ball of gas at the heart of our solar system, keeps us warm and gives us light, plus it provides photosynthesis to make plants grow, and gravity to keep us in orbit around it. Most importantly, it provides energy that we can convert to power. Solar power is clean, usable energy generated from the sun.

Developers wanting to create solar associated applications need the right Application Programming Interfaces, or APIs, to do the job.

Handy Photography Cheat Sheets

Handy Photography Cheat Sheets. There are incredible photography cheat sheets for not just learning and master photographers as well.

Visit The Site For More...

Creating an Angular Web App in 1 second

I've had some time over the summer to work with Magic. One of the more important features I have implemented, is to make it more easy to use, and especially in regards to referential integrity columns. Watch the video below for an explanation.

This allows you to generate your Angular frontend in 1 second, spend some few hours editing the automatically generated frontend, and have an actual working Angular frontend CRUD app, in roughly half a day. I believe this might be especially interesting for more "raw" database access to your backend's database, in particular for cases where you need to some sort of "advanced GUI" to modify your data, in cases where something goes wrong with your app's data for some reasons. As in, making Magic become your app's secondary app, for editing data items in your database. As a simplified version of something like PHP MyAdmin.

im having a difficulty in a program in c++ .Net Framework

So im actually creating a fastfood menu in which save how many times a button been clicked as a variable. So I can multiply it to its value. For example if i click btnChicken a variable will count how many btnChicken been clicked then it will multplied on the amount i set for the value of each chicken.