0

I need to build a preset witch if the original image have width<100 or height<100 resize the image to have the smaller side = 100px

There is a way to do this?

I need this because I have an image displayed with cluod zoom and the zoomed imaged used now is in image style "original" but if the image is small we can have this kind of bug:

Normal (not hover)
enter image description here

Zoomed (hover)
enter image description here

As you can see if the image is smaller than the notzoomed one so I need to fix a minimum dimention.

  • I have no idea if they have this particular option implemented, but see this module. Solved many "How to ... with images?" for me, pretty much anything I wanted from it so far. By the way, can I ask WHY? If image is so small, scaling it up and cutting sides will left you with image that contains less of details - some will get cut away, and the rest will get blurry. Why anybody would want that? – Mołot Mar 24 '14 at 14:45
  • What's wrong with the core image re-sizing + "Allow upscaling"? – Clive Mar 24 '14 at 14:53
  • I need to have a minimum size not a size equal to big and small images.. I'm updating the question to explain why. – Shyghar Mar 24 '14 at 14:54
  • @Shyghar so you need a minimum 100px in a smaller dimension, not a fixed 100x100 square? – Mołot Mar 24 '14 at 15:14
  • I need to not have a zoomed image repeated vertically or orizontally when I go on hover so I needed to fix the smallest side – Shyghar Mar 24 '14 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.