oprava ukladani obrazku
(cherry picked from commit 442b2db)