Merge pull request #1866 from asturur/fix-in-image-resize

fix image resize method