Prevent loading of external resources (converting to pdf)

I want to turn off the loading of external resources (images) during the conversion.

For example, if a .html or .doc(x) file looks like this:

<html>
...
<img src="https://www.somewebsitewithaimage/myniceimage1234.png">
...
</html>

and i convert:

with batch

soffice.exe -headless -nologo -invisible -convert-to pdf "C: \ my.html" - outdir "C: \"

or with C # (. net)

public bool Save (string filename, string filter)
         {
             List <PropertyValue> pv = new List <PropertyValue> ();
             pv.Add (new PropertyValue ("Filter Name", 0, new uno.Any (filter), PropertyState.DIRECT_VALUE));
             pv.Add (new PropertyValue ("Overwrite", 0, new uno.Any (true), PropertyState.DIRECT_VALUE));
             try
             {
                 filename = filename.Replace ("\ \", "/");
                 ((XStorable) doc) storeToURL ("file :/ / /" + filename, pv.ToArray ());
                 return true;
             }
             catch {return false;}
         }

then the images are captured from the external source (http) and stored in the pdf. How can I prevent the loading of external content?

Try making a first export from Menu/File/Exporta PDF and see if link options lets do it so. I think it is saved for the next times.

I have to convert my file programmatically (without a GUI)

Right, but I think some parameters setting up in GUI are used in the console mode.