Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #162637

    Hi all,

    I am trying to find a way to change the portfolio preview image window in an ajax 3 column portfolio to a square dimension. I have a lot of images that are 1080 by 1080 and don’t want to go back through them to reformat to, what I think is, 10W / 8H ratio.

    Or is there a way to make the preview auto fit to the image size. A bit like #angular did in its ajax portfolio?

    Thanks in advance for any help.

    Matt

    #163140

    Hi Matt,

    You can use this plugin to change the default Gallery size to use a square image ratio (710×710):
    http://wordpress.org/extend/plugins/simple-image-sizes/
    Or change this line in your functions.php file to do the same:
    $avia_config['imgSize']['gallery'] = array('width'=>710, 'height'=>575 ); // images for portfolio entries (2,3 column)

    After changing the size you will need to regenerate your thumbnails with the same plugin above.

    Regards,

    Devin

    #163182

    Hi Devin, am I allowed to join in? I have a the same thing in mind, I would like square preview images in the 3 column Ajax portfolio view.
    In my former attempts with the plug-in above the grey image just got squeezed into a square shape, and the coloured one behind did not change at all :(
    Here is a copy of the functions.php. section you mentioned, but there is no ‘gallery’. How do I change the grey preview image & the coloured image without distortion?

    //register additional image thumbnail sizes that should be generated when user uploads an image:
    global $avia_config;

    $avia_config[‘imgSize’][‘widget’] = array(‘width’=>36, ‘height’=>36 ); // small preview pics eg sidebar news
    $avia_config[‘imgSize’][‘post-format-image’] = array(‘width’=>630, ‘height’=>999, ‘crop’=>false); // big images for post format image and gallery posts
    $avia_config[‘imgSize’][‘fullsize’] = array(‘width’=>930, ‘height’=>930, ‘crop’=>false); // big images for lightbox and portfolio single entries
    $avia_config[‘imgSize’][‘featured’] = array(‘width’=>930, ‘height’=>340); // images for fullsize pages and fullsize slider
    $avia_config[‘imgSize’][‘portfolio’] = array(‘width’=>465, ‘height’=>346); // images for portfolio entries (2,3,4 column)
    $avia_config[‘imgSize’][‘logo’] = array(‘width’=>465, ‘height’=>220); // images for dynamic logo/partner element

    //dynamic columns
    $avia_config[‘imgSize’][‘dynamic_1’] = array(‘width’=>446, ‘height’=>151); // images for 2/4 (aka 1/2) dynamic portfolio columns when using 3 columns
    $avia_config[‘imgSize’][‘dynamic_2’] = array(‘width’=>609, ‘height’=>210); // images for 2/3 dynamic portfolio columns
    $avia_config[‘imgSize’][‘dynamic_3’] = array(‘width’=>688, ‘height’=>151); // images for 3/4 dynamic portfolio columns

    Thx in advance!

    #163389

    Hello!

    You’re using 3 columns for your portfolio? You can edit this line of code:

    $avia_config['imgSize']['portfolio'] = array(‘width’=>465, ‘height’=>346); // images for portfolio entries (2,3,4 column)

    Replace it with:

    $avia_config['imgSize']['portfolio'] = array(‘width’=>346, ‘height’=>346); // images for portfolio entries (2,3,4 column)

    Regenerate the thumbnails: http://wordpress.org/plugins/regenerate-thumbnails/

    Regards,
    Ismael

    • This reply was modified 11 years, 3 months ago by Ismael.
    #163489

    Hi Ismael,
    thanks – that did the trick!
    No distortion and square dimensions, perfect!
    Thank you!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘preview image height in Ajax portfolio’ is closed to new replies.