{"_id":"@bernierllc/content-type-image","_rev":"7-76a5f9000edc0451457843bb59806860","name":"@bernierllc/content-type-image","dist-tags":{"latest":"1.5.0"},"versions":{"1.0.1":{"name":"@bernierllc/content-type-image","version":"1.0.1","keywords":["content-type","image","media","upload","storage","file-system","url-publishing"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/content-type-image@1.0.1","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"4b45c799921e471df507d015d8a068cfce65e486","tarball":"https://registry.npmjs.org/@bernierllc/content-type-image/-/content-type-image-1.0.1.tgz","fileCount":47,"integrity":"sha512-FahYrsiOWbP7VAXTF5yZXpTW1k/Pv4SmCcaXk/QRTcD1kIbzLiVoMPltc3GZ7y+UnrKfndk/wmPI3YjICtg+Zw==","signatures":[{"sig":"MEUCIA1yc4isXBc12blKz4sc26TGlYYCVz8AT+Wvvr9DoCcEAiEAsWOHxAOph8SvpvI1ScZrFrQ8Cf0UuHzKOxuHfRCPRKY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":207848},"main":"dist/index.js","_from":"file:bernierllc-content-type-image-1.0.1.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src --ext .ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"_resolved":"/private/var/folders/r0/wspnzd1s18sfjy10ffyv2qxw0000gn/T/20f8163180b7762e66b68c33ef4eed55/bernierllc-content-type-image-1.0.1.tgz","_integrity":"sha512-FahYrsiOWbP7VAXTF5yZXpTW1k/Pv4SmCcaXk/QRTcD1kIbzLiVoMPltc3GZ7y+UnrKfndk/wmPI3YjICtg+Zw==","bernierllc":{"integration":{"logger":"not-applicable","neverhub":"not-applicable","neveradmin":"not-applicable"}},"_npmVersion":"11.6.0","description":"Base image content type with file upload, local storage, and URL publishing","directories":{},"_nodeVersion":"24.10.0","dependencies":{"zod":"^3.22.0","@bernierllc/content-type-registry":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/content-type-image_1.0.1_1762307823688_0.7581560384182606","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bernierllc/content-type-image","version":"1.0.2","keywords":["content-type","image","media","upload","storage","file-system","url-publishing"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/content-type-image@1.0.2","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"e4fc6e9e5a316ea19db56bf06a8198b49cf6fc4b","tarball":"https://registry.npmjs.org/@bernierllc/content-type-image/-/content-type-image-1.0.2.tgz","fileCount":31,"integrity":"sha512-XqSyPTuxFMw0E9a6mpbc1mqCADtfBJ+jkco29Qc/1DCHec4rFIC0Dy+9kntZHxse1VohaihoeqeKiu+pFVsN3w==","signatures":[{"sig":"MEUCIG1sejOS8jYaTrZ7o0PVhkWXl58fM2xqDmpCrFPG5Xi5AiEA0ZbibfTBR2jD1Bo67N+O8Z1muzFxBOr+87/kjzzXgVk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76039},"main":"dist/index.js","_from":"file:bernierllc-content-type-image-1.0.2.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src --ext .ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"_resolved":"/tmp/bc17905e061a43f0aab7e33ae750173a/bernierllc-content-type-image-1.0.2.tgz","_integrity":"sha512-XqSyPTuxFMw0E9a6mpbc1mqCADtfBJ+jkco29Qc/1DCHec4rFIC0Dy+9kntZHxse1VohaihoeqeKiu+pFVsN3w==","bernierllc":{"integration":{"logger":"not-applicable","neverhub":"not-applicable","neveradmin":"not-applicable"}},"_npmVersion":"11.7.0","description":"Base image content type with file upload, local storage, and URL publishing","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"^3.22.0","@bernierllc/content-type-registry":"1.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/content-type-image_1.0.2_1766087433090_0.9775938289583634","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@bernierllc/content-type-image","version":"1.2.0","keywords":["content-type","image","media","upload","storage","file-system","url-publishing"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/content-type-image@1.2.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"eca68245ffad9641ec5ee858a4e64d3ce48623d2","tarball":"https://registry.npmjs.org/@bernierllc/content-type-image/-/content-type-image-1.2.0.tgz","fileCount":31,"integrity":"sha512-2/kl/WRAScDzF6i5wn1kfy0B07FtKWLSk+zzXajbuHYhri/R47dODzJpFnvN8a+EOJqKeMXLh/kYjdvWtaPkuA==","signatures":[{"sig":"MEUCIQDFpKfm9NPuhtmw2v+USUjfj4AQYvKRaD8TL/su7gRK5QIgfX6ve7EOIE+D5wKTlnDXNO9cd/OMOGr/tOmsXnfatIQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":78469},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"af7e74b3715d56d3a193e1bb6743b337c2b0df6d","scripts":{"lint":"eslint src --ext .ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:205a3ffe-7fa2-4c92-ac28-e502d81d0834"}},"bernierllc":{"integration":{"logger":"not-applicable","neverhub":"not-applicable","neveradmin":"not-applicable"}},"_npmVersion":"lerna/9.0.3/node@v20.19.6+x64 (linux)","description":"Base image content type with file upload, local storage, and URL publishing","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"^3.22.0","@bernierllc/content-type-registry":"1.3.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/content-type-image_1.2.0_1767642380481_0.1410687754428388","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@bernierllc/content-type-image","version":"1.2.1","keywords":["content-type","image","media","upload","storage","file-system","url-publishing"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/content-type-image@1.2.1","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"7a49f94eb39f29b7c715c090322a68988134a5ed","tarball":"https://registry.npmjs.org/@bernierllc/content-type-image/-/content-type-image-1.2.1.tgz","fileCount":31,"integrity":"sha512-opHVqklv3xKHhUOb70pP629JLRt0gmKxmH5Wb24jNo/WrXUB4YSDbglqyxC0N5ch1qPOEQS//VMh7kCHvQzcfg==","signatures":[{"sig":"MEYCIQCt9nuUj37BuAjQIVtdj4yAK9+zHS6Fmg8ACjS+SIP7awIhALKCmU8h3Fbb5qCxgRBUck+swnw3LMnNHsU5mNTrLBsx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":78633},"main":"dist/index.js","_from":"file:bernierllc-content-type-image-1.2.1.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src --ext .ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:205a3ffe-7fa2-4c92-ac28-e502d81d0834"}},"_resolved":"/tmp/24bdff0ea2129dcc0094bb39983122f2/bernierllc-content-type-image-1.2.1.tgz","_integrity":"sha512-opHVqklv3xKHhUOb70pP629JLRt0gmKxmH5Wb24jNo/WrXUB4YSDbglqyxC0N5ch1qPOEQS//VMh7kCHvQzcfg==","bernierllc":{"integration":{"logger":"not-applicable","neverhub":"not-applicable","neveradmin":"not-applicable"}},"_npmVersion":"11.11.0","description":"Base image content type with file upload, local storage, and URL publishing","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"^3.22.0","@bernierllc/content-type-registry":"1.3.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/content-type-image_1.2.1_1773078377286_0.15926567251702495","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@bernierllc/content-type-image","version":"1.2.2","keywords":["content-type","image","media","upload","storage","file-system","url-publishing"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/content-type-image@1.2.2","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"100a2c8e270cf384267517b4f226b7dd522c605d","tarball":"https://registry.npmjs.org/@bernierllc/content-type-image/-/content-type-image-1.2.2.tgz","fileCount":31,"integrity":"sha512-Rk2HrMjJQ8f3ewrAWejXac2yYzeq9K1cfgs2HOXHDUVG2QivO4biQk8C3xuA0kbnJmZJJC8LyCbR1gwlz682Ww==","signatures":[{"sig":"MEYCIQDLZhiZ56a5ey0pzDKG0kzrbiFeKQVTiAEwe3alKy+RZAIhAP76+ScoqSjgMTk6yT5N9QbYGUGpLxwHx3iGfsS8SdXM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":78855},"main":"dist/index.js","_from":"file:bernierllc-content-type-image-1.2.2.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src --ext .ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:205a3ffe-7fa2-4c92-ac28-e502d81d0834"}},"_resolved":"/home/runner/work/tools/tools/packages/core/content-type-image/bernierllc-content-type-image-1.2.2.tgz","_integrity":"sha512-Rk2HrMjJQ8f3ewrAWejXac2yYzeq9K1cfgs2HOXHDUVG2QivO4biQk8C3xuA0kbnJmZJJC8LyCbR1gwlz682Ww==","bernierllc":{"integration":{"logger":"not-applicable","neverhub":"not-applicable","neveradmin":"not-applicable"}},"_npmVersion":"11.11.0","description":"Base image content type with file upload, local storage, and URL publishing","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"^3.22.0","@bernierllc/content-type-registry":"1.3.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/content-type-image_1.2.2_1773163072501_0.8457424192115268","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@bernierllc/content-type-image","version":"1.4.0","keywords":["content-type","image","media","upload","storage","file-system","url-publishing"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/content-type-image@1.4.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"c57e68f911c949c2add9ed8a919bbe3d3cd35400","tarball":"https://registry.npmjs.org/@bernierllc/content-type-image/-/content-type-image-1.4.0.tgz","fileCount":16,"integrity":"sha512-Yv1rKscqc0lL1qCbMbOQVMA1Icx+APOPUhRYa6vFGebztbPSq3nunHammrnhpKMTpuJ9SSrqXxdkkD9QjKo54w==","signatures":[{"sig":"MEUCIAZvO98V4dJUFZYpiac53KrrWGjRrCSnP8wc4puxEeWJAiEAvNyNpVMeFsnw9MeEyk6meESQaavwWMbmcFFYBrGbUxM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32451},"main":"dist/index.js","_from":"file:bernierllc-content-type-image-1.4.0.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src --ext .ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:205a3ffe-7fa2-4c92-ac28-e502d81d0834"}},"_resolved":"/home/runner/work/tools/tools/packages/core/content-type-image/bernierllc-content-type-image-1.4.0.tgz","_integrity":"sha512-Yv1rKscqc0lL1qCbMbOQVMA1Icx+APOPUhRYa6vFGebztbPSq3nunHammrnhpKMTpuJ9SSrqXxdkkD9QjKo54w==","bernierllc":{"integration":{"logger":"not-applicable","neverhub":"not-applicable","neveradmin":"not-applicable"}},"_npmVersion":"11.14.1","description":"Base image content type with file upload, local storage, and URL publishing","directories":{},"_nodeVersion":"20.20.2","dependencies":{"zod":"^3.22.0","@bernierllc/content-type-registry":"1.5.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/content-type-image_1.4.0_1779241006876_0.22551977295196712","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@bernierllc/content-type-image","version":"1.5.0","description":"Base image content type with file upload, local storage, and URL publishing","main":"dist/index.js","types":"dist/index.d.ts","keywords":["content-type","image","media","upload","storage","file-system","url-publishing"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","dependencies":{"zod":"^3.22.0","@bernierllc/content-type-registry":"1.6.0"},"devDependencies":{"@types/jest":"^29.0.0","@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.0.0","jest":"^29.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"bernierllc":{"integration":{"neverhub":"not-applicable","neveradmin":"not-applicable","logger":"not-applicable"}},"scripts":{"build":"tsc","test":"jest --watch","test:run":"jest","test:coverage":"jest --coverage","lint":"eslint src --ext .ts","clean":"rm -rf dist"},"_id":"@bernierllc/content-type-image@1.5.0","_integrity":"sha512-0SFdC4IivU4ne6s02aKvdlOxuV0O92MoI736qOIvsIiFSRobo7yXIzJszmfWUaVzW7AS9/1t94TSkh8VVJCyvQ==","_resolved":"/home/runner/work/tools/tools/packages/core/content-type-image/bernierllc-content-type-image-1.5.0.tgz","_from":"file:bernierllc-content-type-image-1.5.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"11.14.1","dist":{"integrity":"sha512-0SFdC4IivU4ne6s02aKvdlOxuV0O92MoI736qOIvsIiFSRobo7yXIzJszmfWUaVzW7AS9/1t94TSkh8VVJCyvQ==","shasum":"f279b7561fe4e29f6e0bf8887bde7177050a0c26","tarball":"https://registry.npmjs.org/@bernierllc/content-type-image/-/content-type-image-1.5.0.tgz","fileCount":16,"unpackedSize":32451,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHMinv4Tl7LN3BajUfd1lhGs14hmiDjMTtlVbuBPiDCdAiEArgqG72v3ZOL9mf94+X5R4lzb0fodqtIBjA/JKC47YTE="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:205a3ffe-7fa2-4c92-ac28-e502d81d0834"}},"directories":{},"maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/content-type-image_1.5.0_1779249743714_0.9379777709351109"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-05T01:57:03.623Z","modified":"2026-05-20T04:02:24.069Z","1.0.1":"2025-11-05T01:57:03.885Z","1.0.2":"2025-12-18T19:50:33.238Z","1.2.0":"2026-01-05T19:46:20.636Z","1.2.1":"2026-03-09T17:46:17.437Z","1.2.2":"2026-03-10T17:17:52.642Z","1.4.0":"2026-05-20T01:36:47.063Z","1.5.0":"2026-05-20T04:02:23.910Z"},"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","keywords":["content-type","image","media","upload","storage","file-system","url-publishing"],"description":"Base image content type with file upload, local storage, and URL publishing","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"readme":"# @bernierllc/content-type-image\n\nBase image content type providing file upload, local storage, and URL publishing with extensibility for specialized image types (Instagram posts, thumbnails, galleries).\n\n## Installation\n\n```bash\nnpm install @bernierllc/content-type-image\n```\n\n## Usage\n\n```typescript\nimport { ImageContentType } from '@bernierllc/content-type-image';\nimport * as fs from 'fs/promises';\n\n// Initialize with default configuration\nconst imageType = new ImageContentType();\n\n// Or with custom configuration\nconst customImageType = new ImageContentType({\n  uploadDirectory: './uploads/images',\n  publicUrlBase: '/images',\n  maxFileSize: 10 * 1024 * 1024, // 10MB\n  allowedMimeTypes: ['image/jpeg', 'image/png', 'image/gif', 'image/webp'],\n});\n\n// Register with content type registry\nawait imageType.register();\n\n// Upload an image\nconst imageBuffer = await fs.readFile('photo.jpg');\nconst result = await imageType.upload(\n  imageBuffer,\n  'photo.jpg',\n  'image/jpeg',\n  'A beautiful photo'\n);\n\nif (result.success) {\n  console.log('Image uploaded:', result.data.publicUrl);\n  console.log('Metadata:', result.data.metadata);\n}\n\n// Retrieve an image\nconst image = await imageType.get(result.data.localPath);\n\n// Get public URL\nconst url = imageType.getPublicUrl(result.data.localPath);\n\n// Check if image exists\nconst exists = await imageType.exists(result.data.localPath);\n\n// Delete an image\nconst deleted = await imageType.delete(result.data.localPath);\n```\n\n## API Reference\n\n### ImageContentType\n\nMain class for handling image content type operations.\n\n#### Constructor\n\n```typescript\nconstructor(config?: Partial<ImageContentTypeConfig>)\n```\n\n**Configuration Options:**\n\n- `uploadDirectory` (string): Directory for storing uploaded images (default: `'./uploads/images'`)\n- `publicUrlBase` (string): Base URL for public image access (default: `'/images'`)\n- `maxFileSize` (number): Maximum file size in bytes (default: `10485760` - 10MB)\n- `allowedMimeTypes` (string[]): Allowed MIME types (default: `['image/jpeg', 'image/png', 'image/gif', 'image/webp']`)\n\n#### Methods\n\n##### `register(): Promise<void>`\n\nRegister the image content type with the content type registry.\n\n##### `upload(file: Buffer, filename: string, mimeType: string, alt?: string): Promise<ImageUploadResult>`\n\nUpload an image file.\n\n**Parameters:**\n- `file` - Image file buffer\n- `filename` - Original filename\n- `mimeType` - MIME type of the image\n- `alt` - Optional alt text for accessibility\n\n**Returns:**\n```typescript\n{\n  success: boolean;\n  data?: {\n    localPath: string;\n    publicUrl: string;\n    metadata: ImageMetadata;\n  };\n  error?: string;\n}\n```\n\n##### `validate(file: Buffer, mimeType: string): Promise<ImageValidationResult>`\n\nValidate an image file without uploading.\n\n**Returns:**\n```typescript\n{\n  valid: boolean;\n  error?: string;\n  metadata?: Partial<ImageMetadata>;\n}\n```\n\n##### `get(localPath: string): Promise<Buffer | null>`\n\nRetrieve an uploaded image by local path.\n\n##### `delete(localPath: string): Promise<boolean>`\n\nDelete an uploaded image.\n\n##### `exists(localPath: string): Promise<boolean>`\n\nCheck if an image exists.\n\n##### `getPublicUrl(localPath: string): string`\n\nGet the public URL for an image.\n\n## Configuration\n\n### Environment Variables\n\n```bash\n# Maximum file size in bytes (default: 10485760)\nIMAGE_MAX_FILE_SIZE=10485760\n\n# Upload directory (default: ./uploads/images)\nIMAGE_UPLOAD_DIR=./uploads/images\n\n# Public URL base path (default: /images)\nIMAGE_PUBLIC_URL_BASE=/images\n\n# Allowed MIME types (comma-separated, default: image/jpeg,image/png,image/gif,image/webp)\nIMAGE_ALLOWED_TYPES=image/jpeg,image/png,image/gif,image/webp\n```\n\n### Configuration Precedence\n\n1. Environment variables (lowest priority)\n2. Constructor options (highest priority)\n\n## Types\n\n### ImageMetadata\n\n```typescript\ninterface ImageMetadata {\n  filename: string;\n  mimeType: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp';\n  size: number;\n  width: number;\n  height: number;\n  alt?: string;\n  uploadedAt?: Date;\n}\n```\n\n### ImageContent\n\n```typescript\ninterface ImageContent {\n  localPath: string;\n  publicUrl?: string;\n  metadata: ImageMetadata;\n}\n```\n\n## Integration Status\n\n- **Logger**: not-applicable - Core content type package with standard error handling\n- **Docs-Suite**: ready - Complete TypeDoc API documentation\n- **NeverHub**: not-applicable - Core package; services using this handle NeverHub integration\n\n## Examples\n\n### Basic Upload\n\n```typescript\nimport { ImageContentType } from '@bernierllc/content-type-image';\nimport * as fs from 'fs/promises';\n\nconst imageType = new ImageContentType();\n\nconst photo = await fs.readFile('profile.jpg');\nconst result = await imageType.upload(photo, 'profile.jpg', 'image/jpeg', 'Profile photo');\n\nif (result.success) {\n  console.log('Uploaded to:', result.data.publicUrl);\n}\n```\n\n### Validation Before Upload\n\n```typescript\nconst imageType = new ImageContentType({\n  maxFileSize: 5 * 1024 * 1024, // 5MB limit\n});\n\nconst photo = await fs.readFile('large-photo.jpg');\nconst validation = await imageType.validate(photo, 'image/jpeg');\n\nif (validation.valid) {\n  const result = await imageType.upload(photo, 'large-photo.jpg', 'image/jpeg');\n  console.log('Upload successful:', result.data.publicUrl);\n} else {\n  console.error('Validation failed:', validation.error);\n}\n```\n\n### Complete Workflow\n\n```typescript\nconst imageType = new ImageContentType();\n\n// Upload\nconst photo = await fs.readFile('photo.jpg');\nconst uploadResult = await imageType.upload(photo, 'photo.jpg', 'image/jpeg', 'Vacation');\n\nif (uploadResult.success) {\n  const { localPath, publicUrl, metadata } = uploadResult.data;\n  \n  // Retrieve\n  const image = await imageType.get(localPath);\n  \n  // Check existence\n  const exists = await imageType.exists(localPath);\n  \n  // Delete\n  await imageType.delete(localPath);\n}\n```\n\n### Custom Storage Configuration\n\n```typescript\nconst imageType = new ImageContentType({\n  uploadDirectory: '/var/www/uploads/images',\n  publicUrlBase: 'https://cdn.example.com/images',\n  maxFileSize: 20 * 1024 * 1024, // 20MB\n  allowedMimeTypes: ['image/jpeg', 'image/png'],\n});\n\nconst result = await imageType.upload(imageBuffer, 'photo.jpg', 'image/jpeg');\n// Public URL: https://cdn.example.com/images/1234567890-abc123.jpg\n```\n\n### Error Handling\n\n```typescript\nconst imageType = new ImageContentType();\nconst result = await imageType.upload(imageBuffer, 'photo.bmp', 'image/bmp');\n\nif (!result.success) {\n  console.error('Upload failed:', result.error);\n  // \"Invalid MIME type: image/bmp. Allowed: image/jpeg, image/png, image/gif, image/webp\"\n}\n```\n\n## Extensibility\n\nThis package serves as the foundation for specialized image content types:\n\n- **@bernierllc/content-type-instagram-post** - Extends with Instagram validation\n- **@bernierllc/content-type-facebook-post** - Uses for image attachments\n- **@bernierllc/content-type-thumbnail** - Specialized thumbnail generation\n- **@bernierllc/content-type-gallery** - Multi-image galleries\n\n### Extending ImageContentType\n\n```typescript\nimport { ImageContentType } from '@bernierllc/content-type-image';\n\nclass InstagramImageType extends ImageContentType {\n  async upload(file: Buffer, filename: string, mimeType: string, alt?: string) {\n    // Instagram-specific validation\n    const validation = await this.validateForInstagram(file);\n    \n    if (!validation.valid) {\n      return { success: false, error: validation.error };\n    }\n    \n    // Use parent upload\n    return super.upload(file, filename, mimeType, alt);\n  }\n  \n  private async validateForInstagram(file: Buffer) {\n    // Instagram-specific dimension/aspect ratio checks\n    return { valid: true };\n  }\n}\n```\n\n## See Also\n\n- [@bernierllc/content-type-registry](https://www.npmjs.com/package/@bernierllc/content-type-registry) - Content type registration and management\n- [@bernierllc/content-type-instagram-post](https://www.npmjs.com/package/@bernierllc/content-type-instagram-post) - Instagram post content type\n- [@bernierllc/content-type-facebook-post](https://www.npmjs.com/package/@bernierllc/content-type-facebook-post) - Facebook post content type\n- [@bernierllc/content-management-suite](https://www.npmjs.com/package/@bernierllc/content-management-suite) - Complete content management system\n\n## License\n\nCopyright (c) 2025 Bernier LLC. All rights reserved.\n\nThis file is licensed to the client under a limited-use license. The client may use and modify this code *only within the scope of the project it was delivered for*. Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.\n","readmeFilename":"README.md"}