I compute the different grids (4x4, 3x3, 3x5) according to the aspect ratio of the uploaded image so it works with landscape and portrait style pictures.
As a kid, once I solved a 3x3 puzzle, the only way to get a new challenge was to buy a different version with new art. Now, using what I’ve learned in web development, I’ve made it so anyone can turn their own gallery photos into a custom puzzle.