'Hide x and y axis from the plot loaded with imager package

I try to code below to insert and display an image in the presentation file with rmarkdown:

library(imager)
img <- load.image('https://makeshop-multi-images.akamaized.net/figmaster1/shopimages/98/82/1_000000018298.jpg')
plot(img, xaxt = "n", yaxt = "n")

Out:

enter image description here

My question is how could I remove x and y axis from the figure? which means I hope to remove the contents in the grey rectangles.

I've added xaxt = "n", yaxt = "n" inside plot(), it seems not working out.

References:

Remove plot axis values



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source