AVIF has different limitations when it comes to the highest megapixel count / largest dimensions. Several decoders may not support larger images, so single-coded photos do not exceed 4k resolution. According to AV1, AVIF Baseline profile coded image items must not have more pixels than 8912896 or wider widths or higher heights than 8192 or 4352. The Baseline profile can still be used to create larger images using grid derivation. You might encounter discontinuities along the grid boundaries, depending on how the image is decomposed. For this particular case, however, the maximum size of a coded picture is 65536x65536.
It is worth noting that these limitations may change as the AVIF format and its decoders continue to evolve and improve. Additionally, it is important to consider the intended use and target audience for an image when determining the appropriate resolution and size. Higher resolution images may not be necessary or even preferable in certain cases, such as when the image will be displayed on smaller screens or when the goal is to reduce file size and load times.