Which Image File Type to Use for Your WordPress Websites

image file type
Are you wondering which image file type is the best for your WordPress website? What can be the ideal type from PNG, JPG, etc? There are other formats like WebP but often users are confused about whether to use it or not. When it comes to high-quality picture formats like AI, PSD, or INDD users get stuck in the uploading process.

This read will help you in making the right selection. But do you know the importance of selecting the right file for your site? We will have included a brief segment about that too. Other necessary segments including information on the elements relating to it are also included.

Importance of selecting the right files for your pictures

It is understandable that selecting an appropriate type for your picture is tough than imagined. But it correlates to the performance of the website and hence needs close attention. Therefore, it is because of the following parameters it is necessary to consider it important.

Speed & Performance – Your website will slow down and server expenses will rack up when you use large images. Hence, go for light images.
SEO Score – For better SEO score it is preferable to avoid heavy or low-quality pictures. Use SEO-ready and high-quality formats.
Aesthetics – Detailing of files varies from one format to another after compression. You must know that every format has a particular use and it should be used accordingly.
Responsive Design – A responsive design file is the one that is supported across all the browsers.
Consistency – Using one type as a major one for your website will help you in achieving consistency across different images. Others can be used as and when required.

Availability of Image File Type

If you are a fresher you might not know that there is a large segment of formats for pictures. In fact, if we consider them all then there are hundreds of them. But, to make things sorted for you we have covered the peculiar ones which are necessary for WordPress websites. They are broadly segmented into two categories i.e. Vector and Raster images.

When a series of pixels form pictures they fall into the Raster category. But, this also becomes the sole reason for it to lose the resolution when compressed. Popular formats for pictures like PNG, GIF, and JPG are a form of the raster.

Pictures that are formed of mathematical formulas and not pixels fall into vector category. When it comes to frequent resizing they are flexible. The fact it is, in an ideal state images must be converted to raster form from vector for use in a WordPress website.

The reason for this is that raster ones are supported by all browsers and lighter. The most recommended ones are PNG and JPG. GIF is only considered when you require animation. So these three types are the most peculiar files for use in your WordPress platform. But, the question still stands about the accepted types in the platform.
image files

Accepted Image File Type on WordPress website

According to Codex, the default formats accepted by WordPress are JPEG, JPG, PNG, GIF, and ICO. ICO is the format used for icons and JPEG and JPG are the same formats. Usually, any icon is used for favicon on the site and not as pictures in posts/pages.

For pages and posts, the default upload is limited to PNG and JPG. You can rely on plugins in case you intend to upload any other format. If you want to try coding then the following code can be used as an alternative to plugins. It should be in the wp-config.php file.


Add the following code in the functions.php file for an alternative method

add_filter( 'upload_mimes', 'my_myme_types', 1, 1 );
function my_myme_types( $mime_types ) {
$mime_types['svg'] = 'image/svg+xml'; // Adding .svg extension
$mime_types['json'] = 'application/json'; // Adding .json extension

unset( $mime_types['xls'] ); // Remove .xls extension
unset( $mime_types['xlsx'] ); // Remove .xlsx extension

return $mime_types;

For adding support for JSON and SVG formats the above code will be helpful. One can easily edit the above code and add other extensions as well. You can try contacting your hosting provider if you encounter problems adding new files.

Best Image File Type to Use

We already came up with three best formats for use in WordPress. All three of them with specific details have been covered in this segment for better understanding.


Its abbreviation is Joint Photographic Experts Group and is well-suited for high compression levels. It can display millions of colors and that makes it the most preferred format for photographs. Users that intend to feature pictures with vivid colors must use it.

Lossy compressions are supported here. Thus, after optimization, the image quality slightly drops. But to ensure performance and best quality the level of compression can be controlled. The major disadvantage here is that it does not offer support for transparent backgrounds.


This format was initially designed to transfer images over the internet and is abbreviated to Portale Network Graphics. They are capable of displaying millions of colors but are relatively heavier than other preferred types. Elements that identify a brand like infographics, logo, screenshots, and main headers are perfect for PNG.

No data is lost during the compression of pictures here because it supports lossless compression. Compared to other format images here are sharper and crisper after compression. The best part is that it supports transparency in the background which makes it an idle choice at various segments.


Well, many people do not agree with it but this is an image file type that must be used more often. Its abbreviation is Graphics Interchange Format and supports both static and animated pictures. Most of the animations on applications and social media handles are GIFs. Unlike other types, it supports only 256 colors. Hence, this makes it unsuitable for many photographs and illustrations with specifics in color gradients.

Visual quality is not lost because it uses lossless compression to reduce file size. In addition, to support transparent backgrounds it supports text labels. Therefore, such functionalities make it perfect for animation and low-resolution videos.

The selection of one for consistency out of the above three depends strictly upon your needs. Each has a unique identity which is perfect for a specific segment. And all those identities and peculiarities are mentioned above. You must decide what you want the most and then make a choice. Remember, if you end up using them carelessly then choosing the right image file type will not be enough. Therefore we have covered the best practices in the following section for your knowledge.

Best Practices for Images

Make the most of your images by following the below practices on your WordPress site. We have briefly covered this area with on-point information.

Image SEO

Image SEO
Images can pass a message and also make your site look good. But, it can also boost your SEO score. To drive more traffic on your digital space using image SEO is one of the trending practices. It can be done strategically for example naming all the images appropriately. Avoid giving random names like picture_01_26587. Instead, provide a particular name like steps_for_optimization. Ensure that after uploading you add alt texts to the pictures. With its help, it becomes easy for screen readers and search engines to see your images.

Image Size

As discussed earlier you must remember that the size can critically affect the website speed. With regard to that, it is essential to use optimized and light images. It is necessary to remain careful with the compression process because the visual quality is equally important.

It is recommended to not resize images with CSS or HTML. Use images with accurate pixels and not more or less than that. Apart from a proper image file type use a CDN, choose a good host, and implement caching.

Maximum Upload Size

Sometimes you have to use a heavy file for particular projects as there are no other options. The default upload size is 2MB on WordPress and this may create problems for you. But, the good part is that this limit can be quickly modified.

Depending upon your hosting provider you may get built-in settings to edit the default upload size. This varies with hosting platforms and the methods for implementing the same also differ. In some platforms that can be done directly while in other you will have to get in touch with the contact team.

Google Analytics

Google Analytics providing the best user experience is the ultimate goal to increase the flow of organic traffic. For this, it is important to know the devices that visitors use. This helps in selecting the right file type for your target audience. This information and similar other stats can be obtained from Google Analytics. This helps in contributing not just to one but to the overall performance of your site.

Selecting the right type is important for aspects like user-experience, speed, consistency, and others. Most importantly it is important for the website’s SEO. A good image strategy will help you develop a great brand image. Hence, ensure that it is not left unattended.

Make sure that you attain a perfect balance of quality, size, and performance with your selection.

About Shri Posts

Shri shares exciting WordPress themes, plugins and other WordPress related news for our viewers. He also posts selected WordPress developers interviews from time to time.

SKT Free Software Theme