Optimized thumbnail upload
(cherry picked from commit 19d3e01)
After cherry pick