spatie / statamic-responsive-images

Responsive images for Statamic 3
MIT License
99 stars 29 forks source link

Force tag width & height parameters to a whole number #180

Closed micahhenshaw closed 1 year ago

micahhenshaw commented 1 year ago

It is probably a rare occurance, but I have had a number of times where the combination of image dimensions & the ratio I've selected have resulted in a decimal number in the output of the responsive tags, which isnt valid html. This PR would just make sure that the output of those parameters are always whole numbers.

ncla commented 1 year ago

You may have to update all tests as it may impact all of them.

Snapshots can be updated by passing -d --update-snapshots through PHPUnit's CLI arguments.

I will look at this sometime this week. Nice catch!

ncla commented 1 year ago

Thanks!