Added Dragonfly image resizing logic.