mozilla / page-metadata-service

DEPRECATED - A RESTful service that returns the metadata about a given URL.
Mozilla Public License 2.0
19 stars 8 forks source link

Compute image properties #38

Closed arcturus closed 2 years ago

pdehaan commented 8 years ago

Not sure how common it is, but according to http://ogp.me/#structured, we may be able to extract these from og:image:width and og:image:height properties (although I'd guess seeing those in the wild are pretty rare and we'd need to scrape images, or have Firefox check sizes):

<meta property="og:image" content="http://example.com/ogp.jpg" />
<meta property="og:image:secure_url" content="https://secure.example.com/ogp.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="400" />
<meta property="og:image:height" content="300" />
jaredlockhart commented 8 years ago

We need to find a way to do this image processing in a way which doesn't completely destroy the stability and performance of the service. We also need to be able to do this for colour extraction from both images and favicons.

arcturus commented 8 years ago

@jaredkerim we started an experiment around taking screenshots for websites and extracting the predominant colors:

https://github.com/mozilla-magnet/magnet-metadata-screenshot

At some point we would like to transform it into a media service, separated from the original metadata extraction to avoid hitting performance problems. Maybe we can spend some time on it mid September.

jaredlockhart commented 8 years ago

@arcturus Yes I was hoping actually that I can separate all the image processing and proxying and caching into a separate service altogether, so we should talk about that more.