fixes #2736 - avoid OOM on upload log image

- only load image if necessary
- downsample on load

Unfortunately inmutable images are only possible in API 11.
Maybe we can encapsulate this in the compatibility package.