add check if it is array for images