resizing images with a fuction

hello.
I would like to resize the size of the images in a site with a function.
It is possible.
for example Thumbnail to 100 * 70
thanks a lot