There seems to be a compatibility problem with the default definition of breakpoints and the Responsive Image module. When browser shown responsive images, they do not appear as defined.
We have seen that the problem is due to the way that the picture element is constructed. You can see the cause described on the involved function template_preprocess_responsive_image
// Retrieve all breakpoints and multipliers and reverse order of breakpoints.
// By default, breakpoints are ordered from smallest weight to largest:
// the smallest weight is expected to have the smallest breakpoint width,
// while the largest weight is expected to have the largest breakpoint
// width. For responsive images, we need largest breakpoint widths first, so
// we need to reverse the order of these breakpoints.
Probably would reconsider the comment was made on this issue Add Breakpoints module support. It seems that Drupal or at least his Responsive Image module is not prepared to deal with the definition of breakpoints as it does currently the Bootstrap theme.
Comment | File | Size | Author |
---|---|---|---|
#7 | 2857335-7.patch | 1.45 KB | markhalliwell |
Comments
Comment #2
esteinborn CreditAttribution: esteinborn commentedI've noted that the bootstrap.breakpoints.yml file included with Bootstrap theme are not weighted, and therefore provide no order of execution for the Responsive Images module in Core.
To fix this, you need to add weight in ascending order for those breakpoints ex:
Comment #3
francescbassasMakes sense. It seems but that is still this way. Should your change considered as patch?
Comment #4
esteinborn CreditAttribution: esteinborn commentedI'd recommend a patch. I currently can't create one from this machine.
Comment #5
francescbassasDoes this serve?
Comment #6
dbjpanda CreditAttribution: dbjpanda commented#5 patch does not work for me. Seems like nothing changed or happened even after applying the patch.
Comment #7
markhalliwellI actually ran into this recently as well. It's also missing the 2x multiplier.