While the plug-in takes a lot of options. The main functionality can be triggered by calling this simple method. It tires to match the width and height of an existing image. Currently, you must have an actual image that is being replaced!
Check it out for an example and the code: