Error
PHP 8.3.10
Call to undefined method Intervention\Image\Image::response()
 / home / nn00692822 / domains / truongmaisaigon.vn / public_html / src / Controllers / InterventionController.php: 68
                $wte->contain(config('type.photo.watermark_product.width'), config('type.photo.watermark_product.height'), background: 'ffffff00', position: 'center');
                $image->place(
                    $wte,
                    $options['position'],
                    $options['offset_x'],
                    $options['offset_y'],
                    $options['opacity'],
                );
            }
            $image = $image->toWebp(100);
            $image->save($thumb_path . '/' . $imageUrl . '.webp');
            return $image->response();
        } else {
            $image = Image::read($thumb_path . '/' . $imageUrl . '.webp');
        }
        return $image->response();
    }

    public function watermarkDetail($src)
    {
        $src = Str::beforeLast($src, '.webp');
        $image = Image::read($src);
        $folder = dirname($src);
        $imageUrl = basename($src);
        $width = $image?->width();
        $height = $image?->height();
        $thumb_path = watermark_detail_path() . '/' . $folder;

        if (!File::exists($thumb_path . '/' . $imageUrl . '.webp')) {
            if (!file_exists($thumb_path)) mkdir($thumb_path, 0777, true);

Request

https://truongmaisaigon.vn/watermarks/280x280x1/upload/product/z5525809179443f3773818f2b277c384bbf216ad435265-1645.jpg
GET
curl "https://truongmaisaigon.vn/watermarks/280x280x1/upload/product/z5525809179443f3773818f2b277c384bbf216ad435265-1645.jpg" \
   -X GET \
   -H 'host: truongmaisaigon.vn' \
   -H 'priority: u=0, i' \
   -H 'accept-encoding: gzip, deflate, br, zstd' \
   -H 'sec-fetch-dest: document' \
   -H 'sec-fetch-user: ?1' \
   -H 'sec-fetch-mode: navigate' \
   -H 'sec-fetch-site: none' \
   -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
   -H 'user-agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)' \
   -H 'upgrade-insecure-requests: 1' \
   -H 'sec-ch-ua-platform: "Windows"' \
   -H 'sec-ch-ua-mobile: ?0' \
   -H 'sec-ch-ua: "HeadlessChrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"' \
   -H 'cache-control: no-cache' \
   -H 'pragma: no-cache';

Browser

Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)

Headers

host
truongmaisaigon.vn
priority
u=0, i
accept-encoding
gzip, deflate, br, zstd
sec-fetch-dest
document
sec-fetch-user
?1
sec-fetch-mode
navigate
sec-fetch-site
none
accept
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
user-agent
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
upgrade-insecure-requests
1
sec-ch-ua-platform
"Windows"
sec-ch-ua-mobile
?0
sec-ch-ua
"HeadlessChrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"
cache-control
no-cache
pragma
no-cache

Body

[]

Context

Versions

Php Version
8.3.10