protected function applyCustomSorting(): void
    {
        if ($this->get('orderSRC') != '') {
            $tmp = StringUtil::deserialize($this->get('orderSRC'));

            if (!empty($tmp) && is_array($tmp)) {
                // Remove all values
                $order = array_map(
                    function () {
                    },
                    array_flip($tmp)
                );

                // Move the matching elements to their position in $arrOrder
                foreach ($this->images as $k => $v) {
                    if (array_key_exists($v['uuid'], $order)) {
                        $order[$v['uuid']] = $v;
                        unset($this->images[$k]);
                    }
                }

                // Append the left-over images at the end
                if (!empty($this->images)) {
                    $order = array_merge($order, array_values($this->images));
                }

                // Remove empty (unreplaced) entries
                $this->images = array_values(array_filter($order));
                unset($order);
            }
        }
    }