Reputation: 95
Been using ImageResizer quite effectively on my projects but just ran into an issue.
I have an img element that can have it's src change frequently but I always have the same dimensions of width and height to resize, along with the anchor=middleleft.
However, I don't want to upscale, so sometimes an image that is too small will be placed there and it won't anchor as desired.
Does anyone know a way to allow the anchor to still work when the image is too small to resize it? Or am I just going to have to have a fallback of css left alignment?
Upvotes: 0
Views: 49
Reputation: 16468
Try scale=canvas
. This ensures the returned image is exactly the requested size, and adds padding as required.
Upvotes: 1