Upload and display thumbnail of a picture

In reference to Image resize on file uploader
Am aware can import and use PIL for image resize in a server module. Was looking for a simple implementation using the anvil.image.generate_thumbnail function though. Thought this was worth documenting a simple example of use as could not get it to work at first examination. Have tried also saving the thumb_pic as an Image class as well and setting to source.
from anvil import *
import anvil.server
import tables
import anvil.image
from tables import app_tables

class Form1(Form1Template):

def init(self, **properties):
# You must call self.init_components() before doing anything else in this function
self.init_components(**properties)

def file_loader_1_change (self, files, **event_args):
# This method is called when a new file is loaded into this FileLoader
file_name = self.file_loader_1.file.name
orig_pic = self.file_loader_1.file
thumb_pic = anvil.image.generate_thumbnail(orig_pic, 640)
self.image_1.source = thumb_pic