Text Processing
Extract image URLs (src attributes) from HTML source code. Supports lazy-loaded images and srcset attributes.
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/image-source-extractor' \
-H 'Content-Type: application/json' \
-d '{"htmlCode":"Paste your HTML source code here to extract image URLs...","includeDataSrc":false,"includeSrcSet":false,"uniqueOnly":true,"sortBy":"alphabetical"}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/image-source-extractor| Name | Type | Required | Description |
|---|---|---|---|
| htmlCode | textarea | Yes | — |
| includeDataSrc | checkbox | No | Also extract from data-src attributes (lazy-loaded images) |
| includeSrcSet | checkbox | No | Also extract from srcset attributes (responsive images) |
| uniqueOnly | checkbox | No | Remove duplicate image URLs from the results |
| sortBy | select | No |
Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-image-source-extractor": {
"name": "image-source-extractor",
"description": "Extract image URLs (src attributes) from HTML source code. Supports lazy-loaded images and srcset attributes.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-source-extractor",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "image-source-extractor",
"arguments": {
"htmlCode": "Paste your HTML source code here to extract image URLs...",
"includeDataSrc": false,
"includeSrcSet": false,
"uniqueOnly": true,
"sortBy": "alphabetical"
}
}
}Questions or issues? Contact [email protected]
| Choose how to sort the extracted image URLs |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}