I need to truncate a long filename with consideration to the file's extensions (png, gif, pdf, etc...) and am wondering what the best practices are, for example:


Should it be truncated to look like this:

thisisanextremely...png or thisisanextremely...


(this is not the same as the other question because this focus on FILENAMES while the other questions focuses on a generalized text -- those two greatly differ)

  • 1
    Possible duplicate of Truncating long text labels - Best Practices?
    – nightning
    Commented Jan 28, 2016 at 19:25
  • I don't think it's the same case as in that question. File extension certainly adds a whole new dimension and allows for different approaches, including use of icons, taxonomies, grouping, pre-filters and many more, none of them covered in that question
    – Devin
    Commented Jan 28, 2016 at 22:42
  • Why is the extension important? I think this would be useful information to answer the question.
    – Jason
    Commented Jan 29, 2016 at 20:09

1 Answer 1


This depends upon what your users need and expect. If your users are, for example, end users simply looking at and choosing among "pictures and images" then the suffix is most likely not necessary. The end users I work with wouldn't know or care. Png, gif, jpg "what"?

If you're working with designers, front-end developers or others involved in production then they most definitely will need the suffix.

Nonetheless: Ask. Test. Show examples.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.