Ticket #23213 - Moved thumbnail uploading code into a hook.