A variant of a filter DownloadFile for images.
Parameters:

Name Type, value Description
pattern Regular expression, default #.# A regular expression for link filtering
name String, default image The name of a new variable
storage String, default images A directory for files storage
fileprefix String, default img A prefix for the name of the file
allowMiteTypes String, default image/png,image/gif,image/jpeg,image/bmp,image/tiff The list of the allowed types of the files (mime), which are separated by commas. If the mentioned parameter is not given, the files of all types, including html will be saved.
minwidth Integer, default 100 The minimal width of the image
minheight Integer, default 100 The minimal of the height of the image
imageclass String CSS class, which will be added to the tag img

Example:

# Source HTML
Set str <p><img\ src="bigimage.jpg"/><img\ src="smallimage.gif"\ width="10"\ height="10"/></p>
# Search for links to images in source HTML and download them. URLs will be replaced in source.
# Images that not satisfied the condition will be removed
Filter DownloadImage str WithParams name=image minwidth=50 minheight=50 imgclass=myimg
# Show result
Dump str image

Result:

str => <p><img src="imgsomeuid1.jpg" class="myimg" /></p>
image => imgsomeuid1.jpg

CyrillicToEntities Standart Filters DownloadFile

Get Started Now. Try the Demo.

To access, use:
Login: demo
Password: demo