• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

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 :

Register for full access

Related Tutorials

  • Custom Genesis Attachment Page for Images

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.