How To Disable Auto WordPress Responsive Images

As of 4.4 WordPress will automatically add the srcset attribute to the images in your content. The srcset attribute allows you to define different images to use at different viewport breakpoints. &lt...

Get WordPress Image ID By URL

In a recent project I needed to automatically assign a image to a post from a URL. This situation happened where I had a library of image URLs which on the publish event of a new WordPress post we nee...

How To Use WordPress Thickbox To Create A Gallery

WordPress comes with an inbuilt Javascript library which allows you to easily show pop-up dialog boxes on your WordPress site. This Javascript library is called Thickbox, which is a lightweight librar...

Add Custom Image Sizes Into Media Library

In a previous code snippet we found about how you can define new custom images sizes to use on your Wordpress theme. This will use the Wordpress built in function called add_image_size(). add_image_s...

Remove Width And Height Attributes From Images

Whenever you upload an image using the Wordpress media library and add this image to your post, Wordpress will automatically add the image Width and Height attribute in the image element. This is fine...

Remove Default WordPress Image Sizes

When you upload an image to Wordpress by default it will be converted to three different sizes. Thumbnail Medium Size Large Size If you don't want your users to use any of these images sizes on your...

Change WordPress Upload Mime Types

In the current Wordpress install you are allowed to upload the following file types. You are only able to upload one of the following types. If the file you are trying to upload is not one of the foll...

Create Custom Image Sizes In WordPress

When you upload an image to Wordpress it will automatically convert the same Image to multiple sizes while still keep the best quality. The default image sizes are setup on the settings -> media sc...

Stop Wordpress Compressing JPEG Images

Whenever you upload an image to Wordpress media library it will automatically compress your images to 90% quality, this is to size a bit of bandwidth on displaying images on your web page. But if you...