ruby image handler