public function get_placeholder_image($post_id, $post_thumbnail_id, $size, $attr = [])
    {
        $original_size = $size;

        $post_id = $post_id ?? \get_the_id();

        if (Image_Utils::get_image_size($size) === false) {
            $size = 'full';
        }

        // Search for a size specific placeholder first.
        $placeholder_url = $this->search_for_placeholder('placeholder-' . $size);

        // Then the post type placeholder.
        if ($placeholder_url === false) {
            $placeholder_url = $this->search_for_placeholder('placeholder-' . get_post_type($post_id));
        }

        // Finally a generic placeholder.
        if ($placeholder_url === false) {
            $placeholder_url = $this->search_for_placeholder('placeholder');
        }

        if ($placeholder_url !== false) {
            $html = \sprintf(
                /** @lang text */
                '<img src="%s" alt="%s" width="%d" height="%d" %s>',
                $placeholder_url,
                get_the_title($post_id),
                \is_array($original_size) ? $original_size[0] : Image_Utils::get_image_width($size),
                \is_array($original_size) ? $original_size[1] : Image_Utils::get_image_height($size),
                $this->parse_attributes($attr)
            );

            /**
             * Filter the placeholder image HTML.
             *
             * @since  1.0.0
             *
             * @param string $output The HTML output for the placeholder image tag.
             * @return string $output The HTML output for the placeholder image tag.
             */
            return \apply_filters('snap_placeholder_img_html', $html);
        }

        return '';
    }