if available use imagick for image previews, because it supports a bigger variety of image formats

please review @DeepDiver1975 @MorrisJobke @PVince81