santifer/career-ops · error · Error
Profile photo not found or unreadable: ${photo} (${err.code
Error message
Profile photo not found or unreadable: ${photo} (${err.code || err.message}) What it means
Error "Profile photo not found or unreadable: ${photo} (${err.code || err.message})" thrown in santifer/career-ops.
Source
Thrown at build-cv-html.mjs:149
c.photo = photo;
return c;
}
if (/^[a-z][a-z0-9+.-]+:/i.test(photo)) {
throw new Error(`Unsupported profile photo URL scheme: ${photo.split(':', 1)[0]}`);
}
const photoPath = isAbsolute(photo) ? photo : resolve(__dirname, photo);
const mime = PHOTO_MIME_BY_EXT.get(extname(photoPath).toLowerCase());
if (!mime) {
throw new Error(`Unsupported profile photo format: ${photo} (expected PNG, JPEG, WebP, or GIF)`);
}
let bytes;
try {
bytes = await readFile(photoPath);
} catch (err) {
throw new Error(`Profile photo not found or unreadable: ${photo} (${err.code || err.message})`);
}
if (bytes.length === 0) {
throw new Error(`Profile photo is empty: ${photo}`);
}
c.photo = `data:${mime};base64,${bytes.toString('base64')}`;
return c;
}
function joinItems(items) {
if (Array.isArray(items)) return items.join(', ');
return typeof items === 'string' ? items : '';
}
// ── Section partials (#2183) ────────────────────────────────────────────────
//
// Resolve the sections/ directory co-located with a given template file.
// For "templates/cv-template.html" this is "templates/sections/".
// For a custom pack at "templates/cv-template.compact.html" we look forView on GitHub (pinned to 9b17a8ac97)
Solutions
- Check that the profile photo path or URL in cv.md / config/profile.yml points to an existing, readable file.
- Use an absolute path or a path relative to the project root, and verify file permissions.
- Re-export the photo as PNG or JPEG if the file is corrupt.
Example fix
profile_photo: assets/headshot.png # ensure the file exists and is readable
When it happens
Trigger: Thrown at build-cv-html.mjs:149 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of santifer/career-ops@9b17a8ac97 (2026-08-13).
Data as JSON: /api/errors/a8280649c37fb655.
Report an issue: GitHub.