Even better: you can let your image server check the accepted formats in the request header and send webp content transparently instead of jpg. Then you don't have to change your markup at all.
Browser's don't really care about file extensions.
https://github.com/uhop/grunt-tight-sprite/wiki/Recipe:-serv...