Sydney Masonry using Thumbnails


#1

Hey Guys,

I have a question. I love using the portfolio section but the fact that the masonry uses the full size image for the portfolio makes it hard for me to have an organized masonry looked. SO I was wondering if there’s any code that can be added to the plugin or something else that will tell the masonry layout to use the thumbnail version of the image instead of a scaled full-size version.

Thanks in advance!


#2

Hello there,

Thank you for asking.

The size of the portfolio image is specified in the core plugin’s file sydney-portfolio > sydney-portfolio.php in this line add_image_size(‘sydney-mas-thumb’, 480);. You might need to adjust it into the following.

$width = 400;
$height = 320;
add_image_size('sydney-mas-thumb', $width, $height);

If you wish the image should be cropped to the specified dimensions using center positions, consider to use the following.

$width = 400;
$height = 320;
add_image_size('sydney-mas-thumb', $width, $height, true);

Since we are editing the core plugin’s file, you should take it at your own risk. In the future update, the modification will be overwritten.

I hope this reply helps.

Warmest regards,
Kharis


#3

Hey Kharis,

I tried your options and then googled to find what certain parts of the code meant to make my own test and nothing really worked. Even though the code seems to be correct, the output is still a reduced image to 480px. I tried to use already existing thumbnail sizes “medium” but it didn’t work. I added what you gave me and it didn’t work either. You can check it out at www.sequentialmac.com. I want to change it so that instead of being a downsized image size, its a square image. I can’t seem to find any code that might guide me to work around is so thats why I’m asking again.


#4

Hello there,

Thank you for reporting.

The new specified size might not be applied to the previously uploaded images yet. Try to regenerate the new-sized images by using this plugin https://wordpress.org/plugins/regenerate-thumbnails/

Let me know how it goes. I’ll wait to hear back from you regarding your stats.

Warmest regards,
Kharis


#5

Hi Kharis,

I must be honest that instead of trying to regenerate the thumbnails I just erased the existing projects (there were only 2) and added a new project and it worked fine.

THANKS!!

I have a question, since this is just a plugin, as long as the plugin itself is not updated, everything will remain the same right? or will I have to reupload the plugin every time the theme is updated and I guess I would have to regenerate thumbnails every time?


#6

Hello there,

> … as long as the plugin itself is not updated, everything will remain the same right?

Yes, it will.

> … will I have to reupload the plugin every time the theme is updated and I guess I would have to regenerate thumbnails every time?

I thought you don’t have to reupload it. You don’t have to regenerate them again unless you changed size value.

Regards,
Kharis