Actually, browsers by default load images somewhat lazily. An image on top of web page does not suspend rendering of remaining parts. As Image data is fetched from server browsers paint the reserved space for images in parallel to rendering the other elements.
Your code generates an image and loads it without attaching it to DOM. It is not lazy loading, it may be pre-loading in some context.
Lazy loading is: not beginning to download images from server until their reserved space is visible on browsers view-port. It is used in cases like your page is longer than the view port and there are images whose position stays at a lower portion of the page. Until you scroll to that position you don't load the images.
So if you want to use benefits of lazy loading you should choose the plugin option.