There is a couple of steps to follow for IrfanView to work properly without getting any errors
Step 1: Make sure you download the 32 bit version as the 64 bit version doesn't have the plugin required. Install 32 bit version
Step 2: Download the 32 bit Plugin installer and install that
Step 3: Go to Help>Installed Plugins, scroll down to IMPDN.dll and tick it, it will give a warning about instability, click ok
Step 4: Enjoy!