Save blog image as jpg

I need to save an avatar from a blob image.
Do you have any snippet or suggest for me?
Thanks!