protected function getImagesWithResizes()
    {
        // first get the images through the relation
        $relation = $this->getRelationForImagesWithResizesCaller();

        $images = $this->{$relation}()->get();

        if (empty($images)) return $images;

        // then get extra info and retrieve the resizes for it
        $fieldId = $this->getCmsReferenceFieldId($relation);

        $resizes = $this->getResizesForFieldId($fieldId);

        if (empty($resizes)) return $images;

        // decorate the images with resizes
        foreach ($images as $image) {

            $fileName = $image->file;
            $imageResizes = [];

            foreach ($resizes as $resize) {

                $imageResizes[ $resize->prefix ] = [
                    'id'     => $resize->id,
                    'prefix' => $resize->prefix,
                    'file'   => $resize->prefix . $fileName,
                    'url'    => Paths::images($resize->prefix . $fileName),
                    'width'  => $resize->width,
                    'height' => $resize->height,
                ];
            }

            // append full resizes info
            $image->resizes = $imageResizes;
        }

        return $images;
    }