How to save Multiple images via

I try to implement a botton in my Panel Dashboard to save multiple rasterized colormaps as images, depending on the selections. It works fine but the the function does not wait for loading respectively rastering images wich is why the saved .png images are pixelated. I tried the time.sleep() function but it did not fix the issue. My approach is like this (this works because its not rasterized):

import holoviews as hv
import numpy as np
import panel as pn
import param


images = {}
images['img_1'] = hv.Image(np.random.rand(100, 100), bounds=(-10e5, -10e5, 10e5, 10e5))
images['img_2'] = hv.Image(np.random.rand(50, 50), bounds=(-10e5, -10e5, 10e5, 10e5))
images['img_3'] = hv.Image(np.random.rand(700, 700), bounds=(-10e5, -10e5, 10e5, 10e5))

class Plot(param.Parameterized):
    plot_select = param.ObjectSelector(default=[*images][0],objects = [*images])
    @param.depends('plot_select', watch=True)
    def plot(self):
        tile = hv.element.tiles.Wikipedia()
        i = tile*images[self.plot_select]
        return i
view = Plot()
widget = pn.Param(view.param, widgets={'plot_select':{'type':pn.widgets.Select, 'name':'select'}},       parameters=['plot_select'])

def save_figs(event):    
    tile = hv.element.tiles.Wikipedia()
    for img in [*images]:
        out = tile*images[img], fmt='png', filename=img)
download_figs = pn.widgets.Button(name='report figs', button_type = 'primary')

pn.serve(pn.Row(view.plot, widget, download_figs))

Is their a statement for the python cernel to wait for loading?