Trim _rename_resize_image code