Moved image optimization to cronjob