Each widget can have its own assets folder for files such as images, JS and CSS files. You choose this folder on the Assets tab of the widget creator, and then use its files in the widget.
Step 1
Open your widget in the widget creator and click the Assets tab. To make a new folder, click Create Folder, enter the Folder Name and click Create Folder.
Step 2
Click the folder in the list to open it. Active Path shows the folder you are in. Then click Set next to Widget Assets Path to make it the assets folder of the widget. You can’t set the main assets folder itself, so open a folder first.
Click Update to save the widget.
Step 3
Click Upload to add files to the folder. Two file names have a special use:
preview_icon.svg is the widget icon in the Elementor panel.
preview_addon.jpg, preview_addon.png or preview_addon.gif is the widget thumbnail on the Widgets page.
Step 4
To load a JS or CSS file from the assets folder, open the js/css Includes tab. Under Choose From Browser, select the checkbox next to the file. The file is added to Js Includes or Css Includes.
Step 5
To use other files, such as images, write {{uc_assets_url}} in the HTML tab. It is the URL of the assets folder and ends with a slash, so add the file name after it. For example:

Click Update to save the widget.