Hi, I have another strange issue after migrating this site. In my content template, I want to output the default WordPress-generated large image size. This is set in the admin as 1024x1024, but the image that is actually generated is generally 1024x768 or thereabouts, depending on the original image. For some reason, I can only seem to get a views-generated image that is cropped at 1024x1024. I think I have tried all possible settings, but I can't seem to access the default large file.
What I want to see is filename-1024x682.jpg, and what I keep getting is filename-wpcf_1024x1024.jpg
WordPress has default sizes for the images which you theme can modify and which you can override in the media settings, which is what you see at Settings > Media, which describes the max dimensions.
If you have a Types image field and upload an image then WordPress generates the various sizes, much like it would if you directly added an image to the media library.
I prepared an image with dimensions 1024x768px and added this to an image field for a custom post. The max-width and height settings for the large image size on my test site are 1024x1024px. I checked the wp-content/uploads directory and saw that WordPress had generated a number of different files, including my-image-1024x768.jpg.
If I then add this image field to the content template for my single posts and choose the settings shown in the screenshot then when I view the post with the image added, it uses the 1024x768 file.
Re-reading your question, am I to understand that if you follow the same steps it chooses a 1024x1024 file?
Can you prepare a new image of 1024x768 (or the same aspect ratio) and add it to a post (i.e. upload it via Types) and then verify what are the different file sizes generated in the uploads folder?
Hi Nigel, thank you very much for your detailed reply! Yes you are correct, when I follow the same steps, I can see both files in the uploads folder, but for some reason it is the 1024x1024 that is being chosen, and not the 1024x768.
What is really weird though is that this only started happening after migration of the site to a new host. With the previous host, the image with the correct aspect ration was being displayed. This is after a direct migration. At the same time (I have another post on the forum about this too), one of my content templates also stopped functioning correctly, where it had been fine with the previous host. Support at the new hosting company suggested I try disabling Varnish cacheing to see if that helped, but I don't think it did.
For unrelated reasons, I have had to revert to the old host since I posted this, so although not exactly resolved, this issue is no longer a problem. Thanks again for your help.
This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.