Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Laracast13's avatar

how detect logo on image in laravel 11

Hello,

How can I detect a logo in an image using Laravel 11? I have an option to upload images for products. After the upload, I need to check if the photo contains a specific logo and display such images.

Which package can I use for this?

0 likes
1 reply
jj15's avatar
jj15
Best Answer
Level 10

There's a package by Spatie, pixelmatch-php, that compares the similarity between images. But the accuracy might not be perfect since it's simply comparing pixels.

For a "smarter" and more accurate solution, I believe the OpenAI (ChatGPT) API allows you to upload images. There are also other computer-vision APIs, but there's obviously the cost factor.

If the logo contains text, OCR could work.

But if you just want to associate products with a certain brand and display the logo on the page, it would be much easier to add a dropdown with all possible brands or the option to add a new one.

Please or to participate in this conversation.