There's a technique in the wild where you can use an in-browser HTML preprocessor to replace instances of "foo.png" with "foo@2x.png" depending on the client's display resolution. It's pretty awesome. It works like this (just imagine a string replacement on src rather than whatever's going on in that example).
Of course, asset hashing breaks this. There's no replacement I can perform on 3d15f.foo.png to end up with 5a1f6.foo@2x.png.
What's your opinion of a feature that would allow you to hash assets as a group? I would love it if grunt-rev would allow me to specify that files matching the pattern *.png and *@2x.png belong to a group of files that should all share the same hash.
Thoughts?
There's a technique in the wild where you can use an in-browser HTML preprocessor to replace instances of "foo.png" with "foo@2x.png" depending on the client's display resolution. It's pretty awesome. It works like this (just imagine a string replacement on
srcrather than whatever's going on in that example).Of course, asset hashing breaks this. There's no replacement I can perform on
3d15f.foo.pngto end up with5a1f6.foo@2x.png.What's your opinion of a feature that would allow you to hash assets as a group? I would love it if grunt-rev would allow me to specify that files matching the pattern
*.pngand*@2x.pngbelong to a group of files that should all share the same hash.Thoughts?