I'm working on a site that has about 10 image styles, and I would love it if the image styles list could be organized in a meaningful way. My first thought was to add a weight to each image style (in code) so that the list would come out organized by my weights. Unfortunately, it does not look like the function image_styles() sorts by weight, or actually by anything at all.
An easy win for developers hoping to organize their image styles would be to add a call to backdrop_sort in here.
If it were to first sort by weight, then alpha by name, we'd get the default behavior for non-developers to have the styles sorted alphabetically, which might also be a win.
in the function image_styles() let's change the last few lines like this:
// Sort the styles by weight, then name.
backdrop_sort($styles, array('weight' => SORT_NUMERIC, 'label' => SORT_STRING));
backdrop_alter('image_styles', $styles);
cache()->set('image_styles', $styles);

Recent comments
[DX] Add layout machine name as a class to the body element Two dashes -- or single dash - between label and value...
July 9th, 2026 - Weekly Meetings
Just to say I discovered an issue with doing this, which I have documented here. https://github.com/backdrop/backdrop-issues/issues/7168 To make this work, before this issue is...
Let users search for NIDs?
You could probably do this with a View where the exposed filter is the node id Ah, interesting idea. Thanks! Would you kindly consider creating links in the...
Let users search for NIDs?