>Otherwise we need specific logic to keep track of source_image.source while we create multiple thumbnails from same source.

We could move the deletion of the source attribute to the next line in this function?