added export function for img