An image-to-video project can produce several files with similar names: the approved still, a motion draft, a cropped export, and a thumbnail. When one of those files is replaced, a folder full of timestamps does not tell you exactly what changed.
A small asset manifest can make the handoff easier to verify. Instead of trusting a file name, the manifest records metadata and a SHA-256 hash for every file. The example below runs entirely in the browser and does not upload the asset to another service.
Define the minimum useful record
Start with information that answers practical questions during review:
const manifest = {
project: "spring-product-loop",
createdAt: new Date().toISOString(),
sourceReferences: [],
assets: []
};
Each asset entry should include its role, file name, media type, byte size, dimensions where available, and hash. A prompt or editing note can live in a separate project record; avoid putting private instructions into a manifest that will be shared publicly.
Hash a selected file with Web Crypto
Modern browsers expose SHA-256 through crypto.subtle. The following function accepts a File from an <input type="file"> element:
async function sha256(file) {
const bytes = await file.arrayBuffer();
const digest = await crypto.subtle.digest("SHA-256", bytes);
return [...new Uint8Array(digest)]
.map(byte => byte.toString(16).padStart(2, "0"))
.join("");
}
This reads the entire file into memory. That is reasonable for small creative exports, but a production application should impose a file-size limit and use a streaming or server-side approach for large videos.
Read media dimensions before adding the entry
For an image, create an object URL and wait for the image to load:
function readImageDimensions(file) {
return new Promise((resolve, reject) => {
const url = URL.createObjectURL(file);
const image = new Image();
image.onload = () => {
resolve({ width: image.naturalWidth, height: image.naturalHeight });
URL.revokeObjectURL(url);
};
image.onerror = () => {
URL.revokeObjectURL(url);
reject(new Error("The selected image could not be decoded"));
};
image.src = url;
});
}
Use a temporary <video> element and its videoWidth and videoHeight properties for a video. Remember that container metadata does not prove visual quality. A 1080 × 1920 export can still contain unwanted motion or malformed product details.
Create the manifest entry
The main function can remain deliberately small:
async function describeAsset(file, role) {
if (!file.type.startsWith("image/") && !file.type.startsWith("video/")) {
throw new Error("Only image and video assets are supported");
}
if (file.size > 100 * 1024 * 1024) {
throw new Error("Select a file smaller than 100 MB");
}
const dimensions = file.type.startsWith("image/")
? await readImageDimensions(file)
: null;
return {
role,
name: file.name,
type: file.type,
bytes: file.size,
dimensions,
sha256: await sha256(file)
};
}
A reviewer can now hash a received file and compare the result with the manifest. Matching hashes show that the bytes have not changed. They do not show that the content is accurate, licensed, or approved; those remain human decisions.
The still or clip might have been exported from Uyo, edited elsewhere, and then renamed for a social placement. The manifest should describe the file rather than make assumptions about the tool that created it. If tool settings matter for reproduction, store their version and identifier separately from the cryptographic record.
Before sharing the manifest, remove private local paths, internal campaign names, and prompts containing confidential information. A JSON download is enough for a small project:
const blob = new Blob(
[JSON.stringify(manifest, null, 2)],
{ type: "application/json" }
);
This approach does not require a backend, a blockchain, or a complex digital-asset platform. It gives a small team a reproducible answer to a narrow question: “Is this exactly the file we reviewed?” That clarity complements visual review instead of replacing it.
This technical article and its example code were drafted with AI assistance. Test and adapt the code for your browser support, security requirements, and file-size constraints before production use.