I have been a casual/semi-enthusiastic photographer for years, and have found that I have lots and lots of photographs at the moment.
I decided to create a portfolio of my work on the web. One of my interests in building the site was how to manage large sized images and how they looked and loaded on a web site.
BUT, then I saw I had lots of photos that I liked and could easily adjust to have as a record of some of the activities that I have done over the years. I couldn’t decide which photos should stay and which to leave out.
I searched a few blogs about photographic portfolios and looked at a lot of themes for photography, a lot of free ones but they are dumbed down to encourage you to go for their Pro versions.
I set up initially with the Minimalist Portfolio theme, but changed as this only had 2 columns of images, I then went on to the free Aperture theme that had 3 columns, and I am thinking of trying the twenty seventeen theme to see how that looks. I found the video tutorial good to get started quickly. I really like this plugin.
Max upload file size for the new WordPress setup was 2Mb. Most of my cameras take a 4-5Mb picture. I did not want to reduce the size of the image files as I was unsure what loss I would have on the images.
So I had to increase the size of the Max Upload for the instance. In fact, after trying lots of different methods, the easiest was to alter the PHP.ini file. Now, I am on a VPS so can access the root of my drive (unlike shared hosting) and I had a bit of a problem trying to find my php.ini file, in the end I did a search window to find it and that worked great. There are a few blogs on increasing max upload file size, here is one, and here is another. They both offer a few methods, try them and find which one works in your case. ( see the 2nd image further down that shows Max Upload size of 16MB)
Initial process, loading media from my computer to WordPress instance on the server.
I started taking the directories that I had the photos in and copied the directory to a sub folder and then deleted a lot of the files and did simple cropping/tidying to the files left in the directory. This was fine to start with but it started to take a very long time to do this and I was not getting through them very well.
The sub-folder that I was editing on my computer I was then uploading onto my WordPress site. My server is in Germany, and I am in New Zealand, so it was slow to upload as all my photos are around 4Mb.
The other issue I encountered was that the files were rotated so all uploads were rotated to LANDSCAPE mode, although lots of them were in PORTRAIT mode, so I had to go to each photo and orient correctly. That took a lot of time as I was doing that on the server.
Overall the process was slow, I had to choose the photos and then display them.
Error with pop-up of files.
I found that I had the masonry display (2/3 columns of images) on the appropriate portfolio page, but when I went to click on the images to view full screen in pop-up a lot of the images do not show. This article explains what is happening and tells you how to solve it. The Temp file on the server has certain permissions that are inherited by WordPress when copying them from the temp directory. My solution was to create another temp directory and point the php.ini to that one. It solved the problem for me.
rethinking what I wanted the site to do
I was initially thinking of only a few photos on the site, in fact some blogs recommend between 10 and 20. That is nice for a photographer to show his/her wares, but that was not what I wanted.
I wanted to load up all the files, set them up onto DATED portfolio pages, so that they could all be reviewed, slowly cleaned out and then I could think about how I wanted to present the images.
So, I wanted to put 1000’s of photos on the site.
WordPress stores files in this location
Looking at the structure of WordPress, it stores the files in the directory:
And puts date subdirectory files by year/month
Then in the Media Library you can filter images by year/month
The database, under wp_posts stores the image locations. So if you try to transfer the backed up database to another instance, the files all point to the first location of the files, so you have to do a search/replace on all the file locations. On all the tables that might reference the images and their location.
WordPress creating image copies of different file sizes
When uploading to WordPress from server (or anywhere) the process creates copies of each photo. See this article for how to stop thumbnails etc being created. At present, from the one file load, I am getting 5 files created in the \wp-content\uploads\ directory. Luckily I have 300Gb of storage on my VPS, so I’ll not worry about that at the moment.
FTP FileZilla to copy files to server before inserting into WordPress instance
I then looked at copying files via FTP across to the Server & then uploading them from the server. Since all the files were on the same machine, the upload should be faster.
So I used Filezilla to transfer the files across. This worked very well. Once transferred, I would then Add New into the Media Library.
Because I was on the remote server doing this, and my server being in Germany, this was usually quite sluggish (especially in evenings when it is the working day in Germany), but all the files came through on the correct orientation.
Plugin for Reorienting images.
I did come across a plugin that rotated the image from landscape, Fix image Rotation and installed it but I do not think it affected any of the images I had previously loaded, I think it only works on files you are loading.
Date on files and where WordPress stores them
( Note- See below for an alternative method- Feb 2018)
The problem was, that after transferring them to the server, all the files had the same date, today’s date! So when uploading it always put all the images in the \wp-content\uploads\2017\12 directory.
WordPress uploads files and categorises them by date, actually month, so I suddenly had 1000’s of files all on one page, so when selecting on which portfolio page I was putting them, I needed to remember where the photos finished. This was fine, to a point as newest photos are loaded to the top. The problem arises when you want a portfolio page that only has people, you have to scroll down through the 100’s of photos, allowing time for a page by page regeneration of the media library, so that took a long time.
So, after transferring the files to the server, I used this free tool to alter, in File Explorer , the attributes of the files, changing the dates of 1/Date Created, 2/ Date Modified, 3/Date Accessed all to read prior to the month I wanted to upload the files to ( I would alter file date to 1, Jan, 2008 for a file I wanted to upload into \wp-content\uploads\2008\2 directory. As the file dates are all earlier than the upload Directory dates, no problem. (If the creation date later than upload date WordPress gets confused, and rightly so).
Next, on the server, I would change the date to a day in the month that I wanted to upload the files to , eg 2/Feb/2008, then I would upload the files to the WordPress site via Add New into the Media Library.
This process, slow as it is, allows me to structure my files by month/year (not necessarily the correct one) so that i can have each month as a separate portfolio page. This will help me edit/manage the information in the future.
I also decided to create a leaner portfolio of just some thematic photographs that I have taken. These can be found on this site. https://image4.cf/
I have had a lot of enjoyment out of doing this exercise. All the photos I have taken are reviewed and there is real pleasure in looking back at things I have been doing. Also its nice to have the photos in a place where they can be shared. Sending a link to someone is not too difficult to share a past memory. Well worth the effort so far. UI would recommend it as a learning process to set up a web site if you are considering doing so.
UPDATE ON BULK UPLOAD (Feb 2018)
I had got about half way through my photograph upload process. (Total on disk about 1.2 TB, so lots).
The article suggested using the plugin Add From Server. This looks at files on your server and then uploads them to WordPress. Not lightning fast but it has a cool feature.
It lets you put the date on the upload files at File Time, so if you have your directory dated:
\wp-content\uploads\2006\06 it will date the files to that date (in the previous process, if the date of the file was later than the date of the folder it would not do it.) Also you do not have to go through the process of changing the dates of all the files.
On the upload it still has to create all the different file sizes for the images from the thumbnail up , that is why it takes so long I presume.
This does cut down on the number of steps in the process and allows for bulk upload with FTP without changing the date of the computer etc.