Closed bentruyman closed 11 years ago
The real fix would be to provide an helper named something like asset_path
which would return only the url of an asset, not an HTML tag, which would avoid having such setting.
I think what I will do in the end is simply removing the auto image size feature as it will annoy more than help most front-end people, what do you think?
cc @renaudleo @cloutierlp
Removing it would also work. It's not much work to re-add the dimensions manually. And with responsive design, you rarely ever specify the dimensions.
I agree we should probably just remove it, or at least not make it the default behavior. As @bentruyman said, you now rarely specify dimensions unless you're serving 2x images, which, anyway would not work with the actual behavior.
That being said, an asset_path helper would probably be great too, even if the auto image size attributes is removed.
We're experiencing issues with our responsive design implementation when images have explicit widths are applied to them. This is also an issue when serving 2x images for high-density displays. Typically, we want images to simply take up only the space that they are provided since they'll likely be in a flexible container.
Normally this works fine, but IE8 in particular is having issues with
max-width: 100%
andheight: auto
on images that have an explicit width.This PR allows you to disable that functionality.