I would presume that it is IrfanView that Avast regards as “potentially dangerous” since that is the default graphics viewer.
So maybe it would just be enough to add Irfanview.exe (if that is the name of the executable, which I don’t know) to the exclusion lists of Behaviour Shield and AutoSandbox.

Just a guess though.