Closed aerni closed 2 years ago
I think this is okay. You can just submit PR and see if the tests fail, there are tests that should fail if there is differing amount of image URLs outputted.
WidthCalculator
is responsible for how many image width variants will be generated for breakpoints.
Could also maybe just change the finishedCalculating
method argument type to float.
I noticed that if I have Ray open and I load a page that uses this addon I'm getting loads of the following warnings that brings down the site. I have to close Ray to make the site load.
I tracked it down to this line in the code: https://github.com/spatie/statamic-responsive-images/blob/6aa75914a6ef5572ef68c00afd4cc79be20e4b19/src/WidthCalculator.php#L32
If I round the value, the warning disappears.
I'm not sure about the implications of this change. So asking here first before submitting a PR to fix this.