Skip Navigation

[Gelöst] How to output default WordPress image sizes

This support ticket is created vor 7 Jahre, 2 Monate. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 Antworten, has 2 Stimmen.

Last updated by zoeS vor 7 Jahre, 2 Monate.

Assisted by: Nigel.

Author
Artikel
#479731

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

Here is the shortcode at present:

[types field="property-gallery" size="large" align="none"  separator=", "][/types]

Thank you

#480149

Nigel
Supporter

Languages: Englisch (English ) Spanisch (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2017-01-20 at 07.50.53.png

Hi Zoe

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?

#480166

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 WPML client and need related help, please open a new support ticket.