Image & Video APIs

When might underscores in public IDs or folder names cause errors?

Last updated: Mar-13-2026

Using underscores in a public ID containing slashes or in folder names (in fixed-folder mode) can sometimes create ambiguity and result in broken URLs on your website. For example, if you have a path in the public_ID (or a folder in fixed folder mode) such as u_2/band_photo, Cloudinary may misinterpret that as a transformation requesting to underlay an asset named "2" under a base asset with public ID favorite_band.

To prevent such issues, consider following at least one of these best practices:

  • Avoid using underscores (_) in the first few characters of public ID paths containing slashes (or in folder names in fixed-folder mode). Instead, use hyphens (-) as delimiters or ensure that at least four characters precede the first underscore, e.g., abcd_1234.
  • Use versioning to separate the public ID path from the transformation section.

✔️ Feedback sent!

Rate this page:

one star two stars three stars four stars five stars