How to Image optimize your WordPress Websites

Do You face Slow issues to your WordPress website? I have an idea, I will tell you a Way How to Image optimize your WordPress Websites.

Nowadays WordPress is a popular platform as a content management system. In the Whole online market, 31% and More websites are based on WordPress. We always want to present our websites to make beautiful.

A beautiful website is made for images and content but When we use more high-quality images to our Post, Then our website being heavy.

We generally use two types of images to our websites like JPG/JPEG and PNG images. PNG format uses transparent type images.

Read More : SEO optimize Your images

Best Format type images to Your Website

WEBP is a Web-based image format, Who are Create images to combined of Coding, So They use low Resource and Small Sizes. This is the best Format type of images They are easily using your website Content.

Use WEBP format to Your Website images

If you want to use your images to your WordPress Website, Then WordPress directly doesn’t allow you to use WEBP images to your site.

But I have a way, Where you can easily use WEBP format images to your WordPress site with some basic tweaks.

If you have already images Then You need to Convert your Existing JPG/PNG images to WEBP images. So I will Recommend a Site Who are easily Convert your images.

You have no need to install any Plugin Just Need to Changes to coding and Server Path. Then WordPress allows WEBP format. So follow our Step and easily implement your site. Then automatically image optimize to your WordPress website.

Implement This Code to Your WordPress Site

Go to WordPress Dashboard >> Appearance >> Theme Editor >> Find Theme Function(functions.php) on the Side menu and add This Code

Carefully watch This Picture, Then Implement This Code in bellow

optimize images in wordpress

Paste This Code to Your Website

function webp_upload_mimes( $existing_mimes ) {
	// add webp to the list of mime types
	$existing_mimes['webp'] = 'image/webp';

	// return the array back to the function with our added mime type
	return $existing_mimes;
}
add_filter( 'mime_types', 'webp_upload_mimes' );

Now Update your Themes. Done!

Be Aware Copy These Code on Your Notepad, If you face any Problem, Then You can Re-Implement These Code to The function.php Section. Otherwise, You may face any issues.

Congratulations You are Successfully Add this Tewaking Code and Now WordPress Allow WEBP format to your WordPress sites.

Pros. of WEBP Format

  • If You are Compare to JPG and PNG images Then WEBP images are low byte but same Resolution and DPI.
  • Don’t Loss any image quality and automatically update to market trend.
  • Serving better quality images to Low bytes and Saving bandwidth to a smarter way.

Cons. of WEBP format

  • Every Browser Can’t Support WEBP format. Safari browser(Apple) can’t Support WEBP format. This is the Latest image Extension.

So This is the Effective way to Image optimize your WordPress Websites. But You can also JPG images to low resolution, to according your Choice. If anything doubts Comment in bellow.

Thanks for Spending your valuable time.

Leave a Comment