• Resolved Imagereultag

    (@lorino)


    Hi Giorgos,

    Thanks for building a plugin that supports variable width – fixed height images.. that’s awesome and super needed in the community! I have been looking for a plugin that supports this for some time.

    I’m struggling to get the fixed height and variable width to work however. I’ve created a Slidr gallery using the following shortcode:
    [slidr gallery=”15788,15787,15758,15755,15753,15750,15748,15387,15386,15385,15384,15383,15382,15381,15380,15379,15378,15377,15376,15375,15374,15373,15372,15371,15370,15369,15368,15367,15366,15365,15364″ height=”400″ gallery img_link="no" slidr number=30]

    Here:
    http://straighttohellapparel.com/test-2/

    As you can see, the images are being cropped in height, distorted, and not obeying the 400px height. It’s worse if the images are set to medium or larger in the shortcode. They also seem to all be the same width rather than their natural variable width at that fixed height.

    Any ideas?

    Thanks!

    https://wordpress.org/plugins/slidr/

Viewing 1 replies (of 1 total)
  • Hello,

    my guess is that it is caused because you are not setting an image size. By default the plugin gets the “thumbnail” size which, in a default WordPress setup, is a 150×150 cropped image (that’s why all images are square and pixelated – they are too small for the container’s dimensions and they get stretched to fit).

    Try setting thumbnail size to medium or large (or, if you registered your own sizes, you can use them too). For example, in your shortcode, try:
    [slidr size="medium" gallery=”15788,15787,15758,15755,15753,15750,15748,15387,15386,15385,15384,15383,15382,15381,15380,15379,15378,15377,15376,15375,15374,15373,15372,15371,15370,15369,15368,15367,15366,15365,15364″ height=”400″ gallery img_link="no" slidr number=30]

    You can also try the “large” size, but if medium suits you, you should prefer it (to avoid loading images bigger than you need).

    PS: Read more about WordPress media settings: https://codex.wordpress.org/Settings_Media_Screen
    If you want to register your own sizes check this reference: https://codex.wordpress.org/Function_Reference/add_image_size

Viewing 1 replies (of 1 total)

The topic ‘Variable Width Fixed Height’ is closed to new replies.