Title: Variable Width Fixed Height
Last modified: August 24, 2016

---

# Variable Width Fixed Height

 *  Resolved [reultag](https://wordpress.org/support/users/lorino/)
 * (@lorino)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/variable-width-fixed-height/)
 * 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/](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/](https://wordpress.org/plugins/slidr/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Giorgos Sarigiannidis](https://wordpress.org/support/users/gsarig/)
 * (@gsarig)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/variable-width-fixed-height/#post-6178470)
 * 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](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](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.

 * ![](https://ps.w.org/slidr/assets/icon-256x256.jpg?rev=2841256)
 * [Slidr](https://wordpress.org/plugins/slidr/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/slidr/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/slidr/)
 * [Active Topics](https://wordpress.org/support/plugin/slidr/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/slidr/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/slidr/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Giorgos Sarigiannidis](https://wordpress.org/support/users/gsarig/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/variable-width-fixed-height/#post-6178470)
 * Status: resolved