Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How I should understand difference between images and media directory? In all my Joomla! sites I was using images for image files displayed in articles, media for PDF's, MP3's etc. Names of these directories led me to do so.

(1) If I have 600×900 px (portrait) banner image which on click goes to 6000×9000 image suitable for large-format printing, should the former go to images and the latter to media directory?

(2) Name media evokes me either abstract media type (PDF, EPUB, MOV) or CSS-like display media (paper, screen, mobile device) or storage media (DVD, HDD, CD). How should I understand directory name media from Joomla! viewpoint? What media are expected inside?

(Main) What is the main rule for decision which directory to use for what?
 

More than simply learning DO's and DON'Ts my goal is to understand intention of Joomla designers for these directories.

share|improve this question
up vote 10 down vote accepted

media is mostly used for

  1. images, script and stylesheets which are served with component and plugins. (These are part of your website source-code)
  2. Content of this folder can be overridden by template
  3. for examples your website-logo is part of source code

But image folder is used for

  1. images in content written by admin/users.
  2. Its safe to assume images folder for user generated contents.
  3. for example your website users upload there profile pic, these should be stored in images folder.
share|improve this answer
    
Honestly, the explanation is too short for me to understand. What exactly do you mean by point 1 and 2? Should I never use media by myself? What about second question I asked? And where to store MP3's, PDF's etc.? – miroxlav May 5 '14 at 8:00
    
Store mp3, pdfs, etc to image folder. As these are content of website, rather than part of source-code. – Shyam May 5 '14 at 9:11
    
Short answer is, it is up to you. You need to manage the site and administer it, which is why it is most likely a bit vague because there is no right or wrong way. – tim.baker May 5 '14 at 12:52
    
You could add that the extension installer makes it easy to store extension assets (javascript, css, images) into the media folder, but not into the images folder. media is indeed for extensions, while images is meant for the user. – Bakual May 5 '14 at 13:38
1  
I have experimented with a third folder (/files) for documents, leaving the image folder for images. Then changing JCE so that it used /files for documents. But it creates more problems as you want the JCE file manager to be able to manage all types of files, including images, so I wouldn't recommend it. The name media could have been better labelled conceptually as extension-images. It also serves javascript, and you don't want end-uses modifying that. – Peter Wiseman May 5 '14 at 22:34

Clients don't have access to the media folder by default. JCE, media manager, a number of galleries and banner sliders, they're all looking to the images folder for content data.

We care more about making things easy and streamlined for our clients and keeping them out of trouble than we do about putting things where we're told, so we use images as the main content media folder. Inside we keep a "files" folder so they can upload pdfs or documents, and we let them organize images and other file types as desired. Background and layout images are kept elsewhere so they can't really destroy their site. Because they're not being permitted to travel outside the images tree, they can't go wrecking stuff.

There's no way we'd want a client to have any access to the media folder. That's for plugins and components to access, not the content writers. Even as a developer I rarely need to go in there and do stuff.

So moral of the story - media is for the CMS, images is for the CONTENT.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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