Image Script

Our themes and Builder use the WP_Image_Editor class to generate post's featured images and Builder images at the sizes specified in the option panel. These are generated once when the page is first loaded. Any subsequent page load will use the image size that was generated and is now saved in disk.

External Images

NOTE: The images from external sites can not be generated/cropped (ie. images that are hosted at a different site/server will not be generated or cropped). The original image source will be used if images are from external sites.

Disabling Image Script

To disable the Image Script, go to Themify > Settings > Image Script tab. Once the image script is disabled, a dropdown will be available for you to choose which image size to use as default.

disable-image-script

The featured image size can be selected separately in: default index layout and default single post layout (located in Themify > Settings > Default Layouts), as well as in each post editing screen (located in the Themify Custom Panel). The image sizes (Thumbnail, Medium, Large) can be set at wp-admin > Settings > Media. In other words, you can specify 250 x 250px medium size to be used in the index pages and 560 x 300px large size for single post page.

image size selection

Notes:

  • Once the Image Script is disabled, the “Image Width” and “Image Height” input value will be used as ‘width’ and ‘height’ attribute in the <img> tag (they are not the actual dimension of the image). The actual dimension of the image will depend on your original source image.
  • If the Image Script is disabled and you need to have consistent image height, you would need to crop the image manually with an image software before uploading (ie. use Photoshop to crop the image).
  • With the Image Script disabled, if you find entering “Image Width” and “Image Height” is not taking in effect:
    – this is because our themes are responsive, we specify the image element to have max-width:100%and height:auto (so the images will respond proportionally on all devices)
    – you can override this by adding this Javascript code in Themify > Settings > General -> Footer Code (the code below will take the image height attribute as you entered which might cause the image to look stretched):

    
    <script>
    jQuery( function($) {
       $( 'img' ).each( function(){ $( this ).height( $( this ).attr( 'height' ) ) } );
    } );
    </script>

Rebuild Thumbnails

When you adjust thumbnail dimensions under WP > Settings > Media, the new sizes are not applied to the images you have previously uploaded to your site. To make the changes affect the standard image sizes Thumbnail, Medium and Large on your site, you need to install and run this plugin: Regenerate Thumbnails. The custom image sizes are regenerated on the fly when the dimension changes.