WordPress media and you
In this day and age images have become more powerful in conveying a message. People tend to see, rather than read. Learn how to add an image and understand how WordPress media is organised.
What is media? What file types?
You are allowed to upload many file types to the database as your WordPress Media.
According to your hosting service the Maximum file size which can be uploaded varies. I am with Siteground and my maximum upload size is 128MB. Sometimes it can be even as small as 2MB. There is a way of increasing the maximum upload size.
Read this post to see how to increase the maximum upload size.
I have made another post (in fact two of them) about how to upload images. Read the posts about how to upload media here.
Ok, Where do they go once uploaded?
WordPress usually stores all the images and media uploads in /wp-content/uploads/ folder in the WP installation root. All uploads are organized in a month and year based folders.
Let’s see an example. If you have uploaded an image called fox.jpg in December 2015, it will be stored as;
Go to cPanel(Or via FTP client) and enter ../wp-content/uploads to find your uploaded media.
WordPress also adds information about your image uploads in the database. WordPress consider these images as attachement posts. That’s why when you click on images it opens a whole new post for it. So like any other post, WP stores information about your image as a post in the database.
When you upload an image as a featured image/thumbnail,WordPress saves this information as a meta key _thumbnail_id and stores it in the postmeta table of your database.
Found multiple files with same image name?
When you go to upload folders you will realise that there are more than one file with same name image in the upload folder. If you look carefully you will see they are with different file sizes.
These are the “Thumbnails” which are automatically created to serve different purposes in WordPress site. There is an argument this lead to increase usage of hard disk space. I agree with that. There is no need for WordPress to create extra thumbnails when you have a theme installed which is coded to create its own thumbnails. So it is best to stop WP creating additional unnecessary thumbnails.
Simply Go to Settings > Media
Then set the values on that page as below.
This will tell WP not to create automatic thumbnails.
So these are some inside facts about WordPress Media. I hope it is useful. Please leave comments