ChatGPT gave me the answer! If you look at the Codepen again, the image is now smooth! The trick was to double the canvas's height and width attributes will keeping the actual element at the original size with css!