Add method to resize jpeg