4 ms·
> Instead of serving a 256x256px image, you can serve a 1px image and tell the browser to scale it up. Of course, if you have to put width= "256px" height= "256
by rekoil 5y ago
> Instead of serving a 256x256px image, you can serve a 1px image and tell the browser to scale it up. Of course, if you have to put width= "256px" height= "256px" into your HTML that adds 30 bytes to your HTML!
CSS is a thing as well, could just use CSS to force all tiles to the same size, regardless of the image data in them. Something like:
.map img {
width: 256px;
height: 256px;
}