added convertJpg to resize image