1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Best Way To Store Images

Discussion in 'XenForo Questions and Support' started by arms, Mar 16, 2013.

  1. arms

    arms Active Member

    If i have a category where every thread has 1 to 5 images, which way would you recommend to embed the images.

    1) Saved to server and then <img> the url

    2) Add the images as attachments.

    3) host the images somewhere else
  2. Dodgeboard

    Dodgeboard Well-Known Member

    4) All of the above
  3. arms

    arms Active Member

    I'll rephrase:

    If an add in allowed you to paste a url and upload an image, would your preference be to upload it to server and return the url or upload it directly as an attachment.
  4. Dodgeboard

    Dodgeboard Well-Known Member

    My preference? Probably an attachment...that way if I ever up and moved servers or make a domain name change, I wouldn't have to change a lot of static URLS to get the images to display.
    arms likes this.
  5. Janmaat

    Janmaat Active Member

    Where do XF store the attachments? In the database or in the file system? Can I choose the location within the file system where to store the files?
  6. 0xym0r0n

    0xym0r0n Well-Known Member

    I do believe you can specify in the config file
    all my attachments are stored in xenforoInstall/data/
  7. Brogan

    Brogan XenForo Moderator Staff Member


    How do I change the internal data path from the default of internal_data?
    Edit the library/config.php file and add the following:
    $config['internalDataPath'] = 'new_internal_data_path';
    Change the path to suit. Note that the path is relative to the installation path.

    How do I change the external data path from the default of data?
    Edit the library/config.php file and add the following:
    $config['externalDataPath'] = 'new_external_data_path';
    $config['externalDataUrl'] = 'new_external_data_url';
    Change the paths to suit. Note that the path is a file path (it can be relative to the installation path) and the URL is how the data will be loaded by users. These values need to point to corresponding locations.
  8. Biker

    Biker Well-Known Member

    Just as an aside, if I found sites taking images from my site and uploading them to their own, you'd be pretty accurate in assuming I would take immediate steps to prevent that practice. In fact, I'd modify things to where even linking would be problematic.

    I don't mind folks linking back to my site, but I have serious heartburn over those that take the images and upload them to their own sites. I don't think I'm alone with this line of thought, either.
  9. arms

    arms Active Member

    As would I if my site had my own work or copyrighted material. But images are for reviews of retail products with links to the site.
  10. Janmaat

    Janmaat Active Member

    What exactly is the difference here between internal and external data path?

Share This Page