Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Where Does WordPress Store Images on Your Site?

Lots of WordPress beginners have asked us how WordPress stores images and what they can do to organize their media library more efficiently.

By default, WordPress saves media files, including images, in the wp-content/uploads directory.

These files are then organized into subfolders based on the year and month of their upload. However, as your website grows and you add more images, it can become difficult to locate or manage them.

At WPBeginner, we have been using WordPress for over 16 years, and with so many images stored in our media library, managing them efficiently became a challenge. Over time, we’ve explored different tools and techniques to keep our media library organized, reducing clutter while ensuring quick access to important files.

This experience has helped us find better ways to manage our images and optimize their storage, improving overall site performance and user experience.

In this article, we will explain how WordPress stores images on your website. We will also share tools and plugins that you can use to easily organize your images more efficiently.

Where does WordPress store image files (Explained)

How Does WordPress Store Images?

WordPress has a built-in system to manage media uploads like images, videos, audio, and documents on your WordPress website.

This system allows you to easily upload images and other media to a specific folder on your WordPress hosting server.

These files are then displayed in your media library, which you can view by visiting the Media » Library page.

WordPress media library

From here, you can edit these files, manipulate them, or even delete them.

The specific folder where the image files are stored in WordPress is called the uploads folder located inside the /wp-content/ folder.

Uploads folder in WordPress

Inside this folder, your media files are stored in year and month folders. Additionally, you will see folders created by your WordPress plugins to save other uploads.

For instance, all your media files uploaded in June 2022 will be stored in:

/wp-content/uploads/2022/06/

You can view these files and folders by connecting to your WordPress hosting account using an FTP client or via the File Manager app under your hosting account control panel.

Media uploads organized in year and monthly folders

You will notice that there are several copies of each image uploaded on your server.

These image sizes are generated automatically by WordPress when you upload an image.

Multiple image sizes

By default, you may see a thumbnail, medium, and large size of the image along with the original upload.

Apart from that, your WordPress theme or plugins may also generate additional image sizes for them to use.

Now, you may be wondering how WordPress displays information about these files inside the media library.

To do that, WordPress also stores information about your image uploads in the database as an attachment post type under the posts table.

Other than that, WordPress also saves information in the posts meta table when you insert images into posts/pages or any other custom post type.

Meta data for images stored in WordPress database

For instance, when you set a featured image, WordPress saves this information as a meta key _thumbnail_id.

It then stores it in the post meta table of your database.

Image meta data stored in WordPress database

The information inside your database tells WordPress the location of the file on your hosting server.

Now if you delete a file from your server using FTP, then WordPress will show those images as broken.

Broken image in WordPress

Similarly, if you delete the reference to an image from your WordPress database, the file will still be intact on your hosting server but will not appear in your media library.

Changing How WordPress Stores Images and Media Uploads

By default, WordPress does not allow you to change the upload location from the WordPress admin area.

The only change you can make is to disable the month and year-based folders by visiting the Settings » Media page from the WordPress dashboard.

Media settings in WordPress

From here, you can also adjust the maximum dimensions in pixels for your image uploads.

Advanced WordPress users can follow our tutorial on how to manually change the default WordPress uploads folder for more details.

Organizing Your Images in WordPress

For most users, the default WordPress media library would work just fine.

However, if images play a more significant role in your WordPress blog, then you may need additional tools to organize your uploads.

For instance, if you run a photography website, then you may want to organize your content in Albums or tags.

For that, you will need a plugin like Envira Gallery. It is the best WordPress image gallery plugin on the market that allows you to organize your images in albums, tags, and galleries.

Envira Gallery provides albums and tags functionality for images

Allowing Users to Upload Images in WordPress

By default, WordPress allows any users who can write posts on your website to upload images. This includes users with the Administrator, Author, Editor, and Contributor user roles.

But what if you wanted other users to upload images on your website without logging into the admin area?

To do that, you’ll need the WPForms plugin. It is the best WordPress contact form plugin that allows you to easily create any kind of form for your website.

It also comes with a file upload field that allows users to easily upload images, documents, and other files without creating a user account or accessing the WordPress admin area.

First, you need to install and activate the WPForms plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, visit the WPForms » Settings page to enter your license key. You can find this information under your account on the WPForms website.

Entering your WPForms license key

Next, you must head to the WPForms » Add New page to create your image upload form.

First, provide a title for your form. After that, you can look for the File Upload Form template to get started.

File upload form

WPForms will now load the form builder interface, where you will see a form preview on the right with form fields in the left column.

This form template includes a file upload field by default. You can add or remove fields, change their labels, or move them up or down.

File upload form editing

You can click on the File Upload field to change its settings. From here, you can set which file types and how many files a user can upload, as well as a maximum file size limit.

For detailed instructions, you may want to see our tutorial on how to create a file upload form in WordPress.

File upload settings

Once you are finished, you can save your form and exit the form builder.

Next, you need to create a new post or page or edit an existing one. On the post-edit screen, go ahead and add the WPForms block to your content area.

Add form to your WordPress website

Next, click on the drop-down menu inside the WPForms block to select the form you created earlier.

You can now save your changes and preview your post or page to see your file upload form in action.

File upload form

You can then view all the files uploaded by users by visiting the WPForms » Entries page from the WordPress dashboard.

Here, click on your File upload form to view an entry and see the uploaded files.

User entry

For more details, see our complete guide on how to allow users to upload images in WordPress.

Bonus: Optimizing WordPress Images for Performance

Images are highly engaging, so they make your content more interesting for users. However, they also take more time to load than just plain text.

This means if you have multiple large images on a page, then your webpage will load slower. This slow page speed affects user experience as well as SEO.

Luckily, there are tons of tools to easily optimize your images for the web before uploading them to WordPress.

For instance, you can use a WordPress image compression plugin like EWWW Image Optimizer to automatically optimize each image that you upload to your website.

EWWW Image Optimizer

You can further boost performance by using a CDN (content delivery network). This allows you to load images from a global network of servers instead of your hosting server.

We recommend using Bunny.net, which is the best CDN service on the market. It is super easy and comes with its own WordPress plugin for quicker setup.

We hope this article helped you learn where WordPress stores images on your site. You may also want to see our guide on how to find royalty-free images for your WordPress blog or see our beginner guide on how to use AI to generate images in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

42 CommentsLeave a Reply

  1. Olaf

    It’s great that developers put a lot of thought into the folder structure. I’ve worked with other content management systems, and honestly, the folder structure isn’t always as clear as it is in WordPress. In Joomla, for example, you often have to search for where things are uploaded, which is much more complicated. I like the structure based on year and month. It’s a pity that WordPress doesn’t have a built-in option to choose a different structure in the settings, like it does for permalinks. I believe many people would prefer a different setup. But anyway, the main thing is that we know where the images actually are.

  2. kzain

    Knowing they’re organized by year and month folders is super helpful for basic management.

    However, sometimes finding a specific image can be tricky, especially if you don’t remember the upload month. Is there a way to improve internal organization within WordPress, maybe with custom folder structures?

    Also, the article mentions storing images on a remote server. While I understand the benefits of that approach, would it affect how the images are displayed within WordPress posts and pages themselves?

    Thanks for the informative post!

  3. Mrteesurez

    Happy to learnt this from your article, all possible possible location where wordpress images are stored. Is it possible to save the images to remote location and serve them inside posts and within website ?

  4. Jiří Vaněk

    By default, Wordpress media is stored in the wp-content/upload folder. Is it possible to change it to another folder in the configuration?

  5. Moinuddin Waheed

    While we upload any image it gets uploaded inside the media gallery of the wordpress.
    while it gets into different months folders by default it becomes handy to organise and access them but at times it becomes hard to find a particular image if not informed of the month of upload.
    Does images of all kinds whether posts or pages gets into monthly folder or only the posts or articles images go inside monthly folder?

    • WPBeginner Support

      All of the images should be included in the folders but you should be able to search by title to find the image in your media library.

      Admin

  6. Omar Abrahim

    Hi,

    The uploads folder is critical, correct? While there are probably references to the images / files stored in the WP database, the actual files in the uploads folder are needed, as they are not stored in the databse. Do I have that right?

    • WPBeginner Support

      You are correct :)

      Admin

  7. guy

    hi
    i have about 100 images in my gallery.
    when i looked at the download images in the server, i sow almost 1000.
    same image 10 times.. with different resolution.
    why is that?
    how do wordpress store images?
    thanks

  8. Gabriel Bartholomeu

    If I only move the files to wp-content folder, does it still creates a reference in database?

    • WPBeginner Support

      No, it would not.

      Admin

  9. Pratik Patel

    Hello Admin,

    I have some issues in automated Generated URLs,

    I have some URLs that includes only individual images in body from the rest of the website URLs, and they are indexed in Google. I wanted to remove this type of URLs from the Google Index.

  10. Luis Garcia

    Hi,

    I have been working in a website. It is a redesign of an already existing page, so what I did was: I exported all posts and pages through WP Exporter, but the images were missing. So, now the posts that had galleries don’t have the galleries, they don’t show up. Later, and as I was really advanced, I realized I should’ve exported and imported the database as well. Long story short, now I am trying to recover those images and make them appear in my current site. Is there a way to blend the last database with the new one?
    Thanks a lot.

  11. Lucy

    Hi,
    Thanks a lot for your help!!!

    Is there a plugin which can help to remove all the images not actualy used in any posts or pages?

    Thank you.

    • John Cena

      Is this possible in WooCommerce?

      Thanks in advance

  12. Nitish

    Hello
    how to upload user images from custom template to custom folders and also in database table.

    Pls help
    Thanku.

  13. Adam

    Hello – Are there other places that WP can store images? I’ve taken over a legacy site (a pretty new site) and an image i need to replace is not located in the media library but does not appear to be hosted outside the site.

    • John

      Hi Adam, did you ever figure this out? I’m running into the same issue. I have a list of images that are too big in file size, so I am going through the site and reducing these to optimize our site upload time. I’m having no luck with finding ANY images that contain “/legacy” in the URL.

  14. Mahmoud Momani

    Hello,
    Thanks for the article.
    I have a question about converting an ASP.NET website to wordpress, if you can write an article describing the required tables and how to insert data in it.
    Thanks.

  15. Holly

    If I delete and image from my media library after posting it to my site will it delete the image off of my site as well?

  16. Ruth Billheimer

    Am I right in thinking that having a lot of images in the media library doesn’t slow up the site? I’m trying to get my head round the way pages load, to try and get a better speed. So if you have a lot of images on a page, they will slow it up but it doesn’t matter how many images you have stored. Is that right?

    • WPBeginner Support

      Yes. You can store as many images on your site as you want. However, WordPress will only load the images displayed on the page. You need to make sure that your images are optimized for speed and performance.

      Admin

  17. nilesh nolkha

    I had one question regarding SEO of images. When you upload pics in media library, you can suggest a title, caption and alt text. Similarly when you are actually adding that media to the post pr image widget on page builder, you again can enter title, caption, alt image etc. Does it matter if we do it once or we have do it again for the media while adding it to a post ? How it is different

    • Ruth Billheimer

      I think the caption can vary depending on where you’re using the image but the others stay the same. The alt text should be different from the title, or you can mark the image as decorative. If you have an accessibility plugin for people with a visual impairment, you also have to fill in the description.

  18. Sandy Ellingson

    Is there a way to export a list of items in the media file with the associated links? I found this post while trying to answer this question. I have looked for the wp_post file via phpmyadmin and can’t find it. Perhaps this is an old post?

  19. Marc Connor

    Do you guys recommend using your own image folder structure via FTP?

    I like to create a folder in the root called “images”, and store the images there. Well, as many as that particular WordPress t heme would let me.

    Is that better or worse than the default date-based structure?

    Sincerely,
    Marc

  20. Bob

    I built a website on my churches server. So now when I’m building my personal site which is a different server. I see all of the media of my churches site with my personal. Oh I built them on my laptop.

  21. Ronnie

    Please make the website responsive on phone

  22. jabbo126

    It’s shame, that Wordpress still haven’t better media files upload solution with better folder organization.

  23. Ikramullah

    Hi,
    My attached one of images are not shown as image tag beside starting paragraph as a tag.
    How to enable this feature?

    I need this info.

    Thanks.

  24. vijay jangra

    Hello editorial staff members, i have read and seen your many blog posts. I have a question in mind.
    How to build these beautiful images for your blog posts.

  25. kif

    hello, can you tell us why wp crop images? even when i upload i single one?

    thank you for your daily edition emails!

    • Nawaze

      I do not know better, but I think after uploading you should change the size to full.

    • Kevin

      WP automatically creates thumbnails, and versions for various sizes (small, medium, large, etc) for use with various devices on responsive website. So generally you’ll have the original size + the various auto-created sizes. You can then pick the appropriate size when adding an image to a page/post and WP will then serve the correct version for the device being used.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.