Optimized image edit functionality