throw if we cannot detect image extension instead of failing silently
ensure agg headers are always installed