twolfson / gulp.spritesmith

Convert a set of images into a spritesheet and CSS variables via gulp
The Unlicense
1.07k stars 81 forks source link

retina.escaped_image is not including the path the path. #134

Closed Trost123 closed 6 years ago

Trost123 commented 6 years ago

For example, escaped_image returns ../images/sp-preloader.png, but retina.escaped_image returns sp-preloader@2x.png. For some reason the ../images/ is dropped for retina url.

twolfson commented 6 years ago

Are you using any parameters like imgPath or cssSpritesheetName? If so, can you verify those have equivalent retina parameters set (e.g. retinaImgPath)? If that doesn't fix the problem, can you paste your gulp.spritesmith configuration?

Trost123 commented 6 years ago

Oops, sorry 😅 Yeah, I did a typo and set imgPath two times, instead of setting retinaImgPath.

twolfson commented 6 years ago

Cool, glad to hear it was an easy fix =) Ideally we would only have to set that parameter once but I think I initially was targeting flexibility instead of ease of use =/