{"schemaVersion":1,"resourceType":"connector","slug":"image","name":"Image","catalog":"img","description":"Decode images, read EXIF and GPS tags, spot near-duplicates by perceptual hash, and make thumbnails","language":"Rust","categories":["documents"],"repository":"https://github.com/Query-farm/vgi-image","license":"MIT","generatedAt":"2026-12-01T18:22:16+00:00","runtime":{"engineVersion":"2.0.1","protocolVersion":"3.4"},"release":{"tag":"v0.5.0","publishedAt":"2026-11-25T19:01:56Z","url":"https://github.com/Query-farm/vgi-image/releases/tag/v0.5.0"},"links":{"html":"https://query.farm/products/orchard/connectors/image/","llms":"https://query.farm/products/orchard/connectors/image/llms.txt","markdown":"https://query.farm/products/orchard/connectors/image/index.md","json":"https://query.farm/products/orchard/api/v1/connectors/image.json","objects":"https://query.farm/products/orchard/api/v1/connectors/image/objects.json","search":"https://query.farm/products/orchard/api/v1/search.json?kind=object&connector=image&q={query}"},"authentication":{"mode":"none_declared","guidance":"No service credentials are declared by this connector. Individual datasets, input files or deployments may have their own prerequisites.","interpretation":"Secret parameter required flags describe the upstream declaration; they do not override the service-level mode above. Keep secrets in environment variables or the deployment secret store. SQL values in angle brackets are placeholders, not automatic environment lookups. Native DuckDB and Haybarn 2.0.1 do not provide a SQL getenv() function, even when worker-supplied snippets mention it. Read environment variables in your application and pass credential values through client parameter bindings (for example, Python con.execute(\"CREATE SECRET stripe (TYPE stripe, api_key ?)\", [os.environ[\"STRIPE_API_KEY\"]]) after attaching the connector. Omit unused optional parameters and keep real values out of saved SQL and logs.","secrets":[]},"deployment":{"local":{"methods":[{"id":"github","label":"From GitHub","icon":"simple-icons:github","steps":[{"title":"Attach the release directly","description":"Downloads the latest release for your platform and caches it locally.","lang":"sql","code":"ATTACH 'img' AS img (\n  TYPE vgi,\n  LOCATION 'github-auto://Query-farm/vgi-image'\n);"}]},{"id":"docker","label":"Docker","icon":"simple-icons:docker","steps":[{"title":"Attach the signed image","description":"Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.","lang":"sql","code":"ATTACH 'img' AS img (\n  TYPE vgi,\n  LOCATION 'oci://ghcr.io/query-farm/vgi-image:0.5.0'\n);"}]}],"pinnedMethods":[{"id":"github","label":"From GitHub","icon":"simple-icons:github","steps":[{"title":"Attach the release directly","description":"Uses the verified release each time you attach the connector.","lang":"sql","code":"ATTACH 'img' AS img (\n  TYPE vgi,\n  LOCATION 'github-auto://Query-farm/vgi-image@v0.5.0'\n);"}]},{"id":"docker","label":"Docker","icon":"simple-icons:docker","steps":[{"title":"Attach the signed image","description":"Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.","lang":"sql","code":"ATTACH 'img' AS img (\n  TYPE vgi,\n  LOCATION 'oci://ghcr.io/query-farm/vgi-image:0.5.0'\n);"}]}]},"selfHost":{"instructions":"https://github.com/Query-farm/vgi-image","connectionGuide":"https://query.farm/vgi/connect-to-a-worker/","guidance":"Deploy using the connector repository instructions and use its supported HTTP or SSH transport. Replace example URLs with your actual deployment; configure its authentication."},"queryFarm":{"available":true,"console":"https://auth.queryfarm.cloud/console/new?worker=image","organizationMonthlyMinimumUsd":10,"pricing":"https://query.farm/products/orchard/hosted/"},"publicDemo":null},"setup":{"extensions":{"duckdb":"SET allow_extension_repositories = 'allowed';\n\nCREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm\n    WITH PREFIX 'https://duckdb-extensions.query.farm';\n\nINSTALL vgi FROM query_farm;\nLOAD vgi FROM query_farm;","haybarn":"INSTALL vgi FROM community;\nLOAD vgi;"},"attachSql":"ATTACH 'img' AS img (\n  TYPE vgi,\n  LOCATION 'github-auto://Query-farm/vgi-image'\n);","attachOptions":[],"note":"Install and load VGI, attach the connector using the catalog alias shown here, then create required secrets. Replace placeholders and omit unused optional secret parameters. Satisfy file, network and credential prerequisites before executing a query."},"example":{"title":"See what you can query","sql":"WITH images(name, data) AS (SELECT 'a.png', from_hex('89504e470d0a1a0a0000000d4948445200000002000000020802000000fdd49a73000000164944415478da6360608812608862601088121088020009be01a9f633974e0000000049454e44ae426082') UNION ALL SELECT 'b.png', from_hex('89504e470d0a1a0a0000000d4948445200000004000000040802000000269309290000002e4944415478da1d864901003008c3f246045ad0819acac355c778e4c0c0e1efaba4aa22a627ba6332130bb4f2de03fd2e1413e2c4ad370000000049454e44ae426082') UNION ALL SELECT 'a_copy.bmp', img.main.convert(from_hex('89504e470d0a1a0a0000000d4948445200000002000000020802000000fdd49a73000000164944415478da6360608812608862601088121088020009be01a9f633974e0000000049454e44ae426082'), 'bmp')), hashed AS (SELECT name, img.main.phash(data) AS h FROM images) SELECT x.name AS image, y.name AS other, img.main.phash_distance(x.h, y.h) AS distance FROM hashed x JOIN hashed y ON x.name < y.name ORDER BY distance, image, other;","requiresCredentials":null,"note":null,"objects":[{"name":"img.main.convert","kind":"scalar_function","links":{"html":"https://query.farm/products/orchard/connectors/image/#obj-main-convert","markdown":"https://query.farm/products/orchard/connectors/image/objects/scalar_function.bWFpbg.Y29udmVydA.md","json":"https://query.farm/products/orchard/api/v1/connectors/image/objects/scalar_function.bWFpbg.Y29udmVydA.json"}},{"name":"img.main.phash","kind":"scalar_function","links":{"html":"https://query.farm/products/orchard/connectors/image/#obj-main-phash","markdown":"https://query.farm/products/orchard/connectors/image/objects/scalar_function.bWFpbg.cGhhc2g.md","json":"https://query.farm/products/orchard/api/v1/connectors/image/objects/scalar_function.bWFpbg.cGhhc2g.json"}},{"name":"img.main.phash_distance","kind":"scalar_function","links":{"html":"https://query.farm/products/orchard/connectors/image/#obj-main-phash_distance","markdown":"https://query.farm/products/orchard/connectors/image/objects/scalar_function.bWFpbg.cGhhc2hfZGlzdGFuY2U.md","json":"https://query.farm/products/orchard/api/v1/connectors/image/objects/scalar_function.bWFpbg.cGhhc2hfZGlzdGFuY2U.json"}}],"evidence":{"status":"captured_result","capturedAt":"2026-12-01T06:21:29+00:00","engineVersion":"2.0.1","protocolVersion":"3.4.0","releaseTag":"v0.5.0","sample":{"columns":["image","other","distance"],"types":["VARCHAR","VARCHAR","INTEGER"],"rows":[["a.png","a_copy.bmp",0],["a.png","b.png",17],["a_copy.bmp","b.png",17]],"more":false}},"artifact":null},"objects":{"total":10,"index":"https://query.farm/products/orchard/api/v1/connectors/image/objects.json","search":"https://query.farm/products/orchard/api/v1/search.json?kind=object&connector=image&q={query}"},"agentTasks":["Report the image format (for example 'png' or 'jpeg') of the image whose raw bytes are the hex string 89504e470d0a1a0a0000000d4948445200000002000000020802000000fdd49a73000000164944415478da6360608812608862601088121088020009be01a9f633974e0000000049454e44ae426082.","What is the pixel width of the image whose raw bytes are the hex string 89504e470d0a1a0a0000000d4948445200000002000000020802000000fdd49a73000000164944415478da6360608812608862601088121088020009be01a9f633974e0000000049454e44ae426082?","Does the image whose raw bytes are the hex string 89504e470d0a1a0a0000000d4948445200000002000000020802000000fdd49a73000000164944415478da6360608812608862601088121088020009be01a9f633974e0000000049454e44ae426082 carry any embedded EXIF metadata tags? Return a single boolean.","Does the image whose raw bytes are the hex string 89504e470d0a1a0a0000000d4948445200000002000000020802000000fdd49a73000000164944415478da6360608812608862601088121088020009be01a9f633974e0000000049454e44ae426082 contain GPS location metadata? Return a single boolean.","Compute the 64-bit DCT perceptual hash (the phash function) of the image whose raw bytes are the hex string 89504e470d0a1a0a0000000d4948445200000002000000020802000000fdd49a73000000164944415478da6360608812608862601088121088020009be01a9f633974e0000000049454e44ae426082.","Compute the 64-bit difference hash (the dhash function) of the image whose raw bytes are the hex string 89504e470d0a1a0a0000000d4948445200000002000000020802000000fdd49a73000000164944415478da6360608812608862601088121088020009be01a9f633974e0000000049454e44ae426082.","Compute the 64-bit average hash (the ahash function) of the image whose raw bytes are the hex string 89504e470d0a1a0a0000000d4948445200000002000000020802000000fdd49a73000000164944415478da6360608812608862601088121088020009be01a9f633974e0000000049454e44ae426082.","You are given two images as hex byte strings. First image: 89504e470d0a1a0a0000000d4948445200000002000000020802000000fdd49a73000000164944415478da6360608812608862601088121088020009be01a9f633974e0000000049454e44ae426082. Second image: 89504e470d0a1a0a0000000d4948445200000004000000040802000000269309290000002e4944415478da1d864901003008c3f246045ad0819acac355c778e4c0c0e1efaba4aa22a627ba6332130bb4f2de03fd2e1413e2c4ad370000000049454e44ae426082. Compute the phash (perceptual hash) of each image separately, pass those two hash values into the phash_distance function to get the Hamming distance between them, and answer whether the two images are perceptually different (is that distance greater than zero). Return a single boolean."],"provenance":{"generatedAt":"2026-12-01T18:22:16+00:00","repository":"https://github.com/Query-farm/vgi-image","harvest":{"status":"ok","method":"github-auto","error":null,"vgi_version":"9773130dde"},"catalogVerification":{"verified":true,"status":"passed","total":6,"passed":6,"failed":0,"needs_credentials":0,"location":"github-auto://Query-farm/vgi-image@v0.5.0","transport":"github-auto","environment":{"vgi_extension_version":"9773130dde","haybarn_version":"2.0.1rc3","engine_version":"v2.0.1","python":"3.12.4","platform":"darwin_arm64","protocol_version":"3.4.0"},"checked_at":"2026-12-01T06:17:00+00:00"},"interpretation":"Catalog verification records the harvest environment. It is not proof that every query or current live API call succeeds. Only an example with captured_result has a saved result for that exact SQL."},"interpretation":["Missing, null, or undeclared metadata means unknown; do not invent defaults, credential scope, platform support or endpoint URLs.","Search is keyword retrieval, not proof of a capability. Read the exact object declaration before generating SQL.","A table and a table function can have the same name. Preserve parentheses and use the matching overload and schema.","Service credentials, external data availability and deployment authentication are separate requirements."]}