rmrevin / yii2-minify-view

Yii2 View component with minification css & js
MIT License
191 stars 67 forks source link

base64 in css #14

Closed eshchapov closed 9 years ago

eshchapov commented 9 years ago

base64 svg and other images in css, minify non correct. but if move it into pure html img tag it pass correctly.

rmrevin commented 9 years ago

Show your css style, that is wrong minification. Just I checked. Base64 png and svg working normally at the minification.

eshchapov commented 9 years ago

Im using 1.7.8 and really don't know if you fixed it later.

@font-face {
    src: url(data:font/truetype;charset=utf-8;base64, ... 
}

passing ok.

.class {
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANklEQVQImW3JoRHAIAAEwSWKgiIpIqklhdEEHb2JxKAYTu6VJBU3Pjxw4cfAu4aSxFY/YTthnbk4D90EWKnJAAAAAElFTkSuQmCC');
}

output fails. without really php errors, just browser cant read property correct. chrome last version.

rmrevin commented 9 years ago

Are you sure you have the valid base64? I could not decrypt data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANklEQVQImW3JoRHAIAAEwSWKgiIpIqklhdEEHb2JxKAYTu6VJBU3Pjxw4cfAu4aSxFY/YTthnbk4D90EWKnJAAAAAElFTkSuQmCC through a browser or through an online service.

eshchapov commented 9 years ago

sure, cause i move this code to tag and it works fine.

rmrevin commented 9 years ago

Fixed in version 1.8.5.