Correct me if I'm wrong, but as far as I know the max texture size is not a software but a hardware limitation. While newer graphics cards for pc might support 8k (like mine) or more, graphic chips on smartphones might only support 2k or 4k.
WebGL has a function to retrieve the graphic card's/chip's max size: gl.getParameter(gl.MAX_TEXTURE_SIZE)
Here is a test page (originally created by a user to present a bug that is already solved): http://innovatology.nl/clients/rim/bb10/webglbug3/?2048.png
It reports the card's max texture size and draws a 2k or 4k texture