fix compatibility with ondemand image resizing