Slide Breaking Height of Image
This support request was posted in Paeon by michaelsimpson
- michaelsimpson December 13, 2013 at 2:46 pm
Hi Juan,
When using the slideshow for the homepage, two of the three slides load and display at the correct height but my final slide appears to break the ‘defined height’ and takes up most of the page view.
Any ideas why this is happening. Should the images used in the slideshow be a specific width / height?
Thanks for your time and sorry for the trouble.
Juanfra Aldasoro December 13, 2013 at 2:57 pmHi Michael,
Thanks for writing.
The slider takes the height of each image and adjusts its height taking that into account.
When you use images that are smaller in dimensions than what they are “meant” to be for the slider, the WordPress resizing functionality for images doesn’t resize them, and they are displayed with their original aspect ratio (http://en.wikipedia.org/wiki/Aspect_ratio)
Try using images bigger than 2560 x 1000 and they’ll all look the same size (because the WordPress resize functionality will actually resize them).
If you don’t have images that are that big, then try to resize them manually before uploading them. Getting the aspect ratio of 2560 x 1000 with an aspect ratio calculator (http://andrew.hedges.name/experiments/aspect_ratio/)
Best,
Juan.michaelsimpson December 13, 2013 at 3:26 pmAmazing, thank you so much for the quick reply.
One more question if you don’t mind, is it possible to adjust the slider height to make it smaller? If so, what template file would i find this in?
Juanfra Aldasoro December 13, 2013 at 3:31 pmHi Michael,
As I mentioned before the slider height adjusts with the height of each one of the images.
So, in order to adjust the height, you’ll need to adjust the height of the images. The different image sizes are defined on the file /paeon/includes/theming.php, function nice_theme_setup(). You’ll find an image size set up for the ‘nice-slide’.
Then, you’ll also need to edit when the image is called by the slider, on the file header.php where it says:
nice_image( array ( 'key' => 'slider-image', 'width' => 2560, 'height' => 1000 ) )
After doing that you’ll need to regenerate thumbnails in order to have the new dimensions for your existing media, or else, upload new media.
Best,
Juan.
You must be logged in to reply to this topic.