Change Attachment Page Image Size

This code enables you to change the size of your images when displayed on the attachment page.

attachment-image-size

By default, WordPress is coded to display the medium size image.

1. You can change the size manually using CSS with the classes you can grab from the attachment pages source code like this:

.single-attachment img {
    width: 100%;
    height: 100%;
}

The CSS method is not efficient and will also produce poor resolution when increasing the size of images.

Or

2. Use the following code to change all existing image sizes on all attachment pages, which is more efficient. You could also use the following code with conditional tags.

Register or login to access the code :

Related Tutorials

One response to “Change Attachment Page Image Size”

  1. […] Change Attachment Page Image Size […]

Was This Tutorial Helpful?