I searched for this but maybe I’m missing it. This site I’m building: http://2016.mazmaniainc.com/boas/zipper-vests/ is using the Gallery Module to show the clothing that this client makes. The gallery works great, however, I’m using the sizing of “Small” which is just a bit too small, and the “Medium” is a good deal too large. The photo size when you click the image is perfect (but I sized the jpg files to that size).
Is there a way to change the default “small” size? If so, where and how? I just need them a little bigger.
The Gallery module has specific sizes set in the module code. However, if you like you can override these. What you will need to do is follow the instructions on our KB, which I have linked below.
Then open up the gallery.php file in your favourite code editor (I recommend Atom by GitHub or SubLime Text) then go to line 270 and change the size values there.
After completing this, you may need to use the regenerate thumbnails plugins.
Thanks. I guess I’m missing something. I followed the steps you suggested and I’m still not having any luck. My images are still 150 pixels wide and I changed the small size to 250 in the gallery.php file in my theme’s folder. I used Regenerate Thumbnails after I made the change as well.
Am I missing another place that it needs to be changed? Is this based on the padding or margins? The page not being wide enough?
Well, it didn’t make the photos bigger, but there were 2 rows of 4 and now I have 3 rows. So it looks like they are taking up more space, but the images are the same size. So, I regenerated the thumbnails again, but didn’t help.
I believe the issue is that your images height is greater than its width. The setting is fo width and the height is adjusted accordingly.
So we can make sure your custom Gallery module is working. Can you upload a more squared image and see if the width is same as the setting in gallery.php.
This is really driving me crazy. The changes work, but in such a weird way. If I set my size for small to 300 they jump up huge. If I set it to 299 it goes right back to the small version. If I set it to 50 they get tiny, but it’s like this weird thing were there is no difference between 250 and 299 and then 300 the images jump up huge.
There has to be a way that I can get these images just a bit bigger than what they are defaulting to without getting huge, right?
Can you provide me with FTP access so I can take a look at your changes. As, the images don’t even have a width of 300 pixels which is what you said you set it to. They’re currently at 376px.
As well as FTP, can you provide temp admin access.
I am just awaiting some info from our developers. As I added your images to a test site of mine and played around with the values from the gallery.php file. It doesn’t appear to be based on image width as I first thought.
Therefore, as soon as I have more information, I will reply here. I apologise that this is taking longer than it should.
Also, I did notice that a few of images have different dimensions. I would recommend you edit your images so that they’re all uniform.
Also, I have spoken to our developers and they have confirmed what I suspected and that those values are the min-width of the images. Therefore, what is happening is like I mentioned above.
Where when you change the value, what happens is that the images width is set and the height is automatically calculated to the width of the image so that they remain in proportion.
I think the best course of action is for you to try and edit the images so that they have similar widths and heights. This is will make it much easier to manage.
If you wish to keep the image dimensions as they’re, we may need to try and use custom CSS to get your ideal size. However, this may cause some issues with the layout.
I’m a bit confused by the min-width thing. What width would I need to make them? Should they all be in the same size square? Thoughts?
This is what I did last year when it was just html. The size is much better. They’re not square images. All the same height, but different widths depending on how the model is standing. http://mazmaniainc.com/lw-jackets.html
Thanks in advance for any suggestions you may have.
I’d just like to chime in here. It seems the code Danny referred to above only changes the minItemWidth attribute of the jQuery plugin we’re using which controls the min-width of the column/wrapper the image is in, not the image the itself.
Can you change everything back to default, and instead, change the media sizes found under Settings > Media? If you’re using the medium size on the module, you’ll want to adjust the medium size in the media settings. Since your images are tall in nature, try adjusting the max-height on the setting.
Thanks! That was it. I didn’t realize the media settings WP controlled the image size in galleries. I guess I should have, but just thought it was a BB thing.
Thanks so much. Thanks Danny for sticking with me.