how does these facebook numbers([[298356516884232]] ...many like this) make "images" together?
black and white images like trollfaces ,recently there were coloured images too. any idea?

Dani AI

Generated

— building on comments from , and , the bracketed tokens in posts are a presentation pattern that replaces short text tokens with image assets at render time. The practical way to reproduce that behaviour is to treat the brackets as shortcodes and implement a small token->asset pipeline that handles storage, lookup and safe rendering.

A compact pipeline:

  1. Define a token format (for example [[sticker:slug]] or [[12345|alt text]]) and store a manifest (DB or JSON) that maps each token to metadata: canonical URL, MIME, width/height, alt text, and whether the asset is an SVG, sprite, or raster file.
  2. Choose a renderer strategy — server-side replacement (replace tokens with HTML before sending) or client-side progressive enhancement (leave tokens in text, then a small JS replaces them with <img>/inline SVG after load).
  3. Deliver images from a trusted image server or CDN, and add caching, resizing and content-type validation on the image pipeline.

Simple client-side example (minimal idea, not production hardening):

const TOK = /\[\[([^\]]+)\]\]/g;

function renderTextWithImages(text, lookup) {
  return text.replace(TOK, (m, token) => {
    const info = lookup(token); // return {url,alt,w,h,type}
    if (!info) return m;
    return `<img src="${info.url}" alt="${info.alt||''}" width="${info.w||''}" height="${info.h||''}">`;
  });
}

Design notes and cautions: for many tiny monochrome icons prefer SVG symbols or icon fonts (easier recolor and tiny payload) or a sprite sheet to reduce HTTP requests. Avoid embedding lots of base64 data URLs in HTML unless assets are extremely small — base64 inflates size and defeats CDNs. Sanitize token input, validate image MIME types, run images through an image proxy/resizer, and ensure Content Security Policy allows your image domains. If tokens render as raw text, the typical causes are the replacement running after HTML-escaping, sanitizers stripping markup, or the renderer not running in that output context; run replacement in the correct phase and keep accessibility (alt text/ARIA) in mind.

Recommended Answers

All 3 Replies

hello silvercats these numbers are just the picture ID as for the troll ffaces and all thhese are designed in photoshop or other photo editing softwares i hoe this helps

Member Avatar for Member #949455

how does these facebook numbers([[298356516884232]] ...many like this) make "images" together?
black and white images like trollfaces ,recently there were coloured images too. any idea?

Like what php.coder those are just numbers that is generated by facebook to displate the images. Regarding how to do that I don't really know.

for your own use, try, base64 encoding, the image is written as displayable characters and recoded on the fly
the same as images are embedded in email
a likely google search would be multipart mime refers to email but the process is the same

the ([enclosed]) also ([[ ]]) (([[ ]])) ([[[ ]]]), facebook numbers do not actually encode anything, they are references for facebook javascripts to access stored images, references to user id_s, references to anything facebook want to reference, obscured - not encrypted

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.