Skip Navigation

[Fixed in next Release] size thumbnail is not working

This support ticket is created 2 years, 4 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 9 replies, has 2 voices.

Last updated by Waqar 2 years, 4 months ago.

Assisted by: Waqar.

Author
Posts
#2386701

Hi,

In a view, I have this shortcode:
[types field='foto' title='%%TITLE%%' alt='%%ALT%%' align='left' size='thumbnail' resize='proportional' separator=' '][/types]

But at the frontend, I see my images full size.
What can I do to resize them to the desired size.
Here a test view: hidden link

#2387081

Hi,

Thank you for contacting us and I'd be happy to assist.

By default, the "thumbnail" image size is set to 150 x 150 in WordPress. But it looks like on your website this size is set to use larger width and height values.
( you can view the image size settings at WP Admin -> Settings -> Media )

When the original size of an image is smaller than the set size, its copy in that size won't be created. And when you'll call that size in the Types field shortcode, the original full image size would be used instead.

Looking into the sizes of the images used on that page, they're not very large, so you can set the "thumbnail" image size to a smaller value, like 200 x 200 or 150 x 150, etc. And after making a change in the image size settings, you'll need to use the "Regenerate Thumbnails" plugin ( https://wordpress.org/plugins/regenerate-thumbnails/ ) to generate all the image thumbnails again.

And, if your goal is just to show the images in a specific custom size, you can pass the width and height value in the Types fields shortcode, like this:
( ref: https://toolset.com/documentation/customizing-sites-using-php/functions/#image )


[types field='foto' title='%%TITLE%%' alt='%%ALT%%' align='left' size='custom' width='300' height='200' resize='proportional' separator=', '][/types]

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2387195
server.JPG
size.JPG

Hi,

it is not working yet.
I also have these sources: All images have a thumbnail in the right size and in the wizzard I can choose for the Thumbnail.
It worked before... There is no difference between your and my code. Nothing has changed..

#2387247

Thanks for writing back and that is strange, indeed.

Can you please share temporary admin login details, in reply to this message?

I'll also need your permission to download a clone of the website, in case it needs to be investigated on a different server.

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

#2387445

Thank you for sharing the access details.

I noticed that the images used in the image custom field "foto", are not stored in the standard folders that WordPress manages for the uploads in the media library.

For example, if you'll upload a new image to the media library, its path would be:
{yourwebsite}/wp-content/uploads/{year}/{month}/filename
( this is working as expected )

However, if you'll check the images used for the post "Antieke Hollandse Empire Mahonie Chiffonnière met 7 laden" ( the first result in the view), the images are stored in a different folder structure, for example:
{yourwebsite}/wp-content/uploads/article_images/19142/25247/Mahonie_Chiffonniere_H_3.jpg
( those image URLs are also using "www" when your website is not )

As WordPress and Toolset can't find their image sizes in the regular media library path, their original size images are being shown.

Have you migrated this website's data from a different platform? Or was a different media library folder structure was being used on this website earlier?

To be able to properly use those images as regular media library images, you'll need to upload them again, so that they're uploaded in the regular media library folder structure and you can call them in different image sizes. I understand that there are many posts and images involved, which is why this operation can be quite time-consuming.

One alternative is to keep the images coming in the full sizes, but use the custom CSS code, to control their size on the front-end. For example, in your view "plaatjes control", you can include the following CSS code:


.cont img {
    max-width: 120px;
}

I hope this explanation helps and let me know if you have any questions.

#2387515

Hi Waqar,

Ok, I see.
The original website is not a WordPress website: hidden link
So we filled the database by SQL statements and therefore we kept the image path intact for the reason you mentioned: It would be very timeconsuming. New articles will be stored in the normal uploads structure.

The css solution is not a great solution. We still have bigger images what increase the loading time.
I also want square images, because we use them in the article singel post.

I remember that I used a media file plugin before, for recognizing other folders. I will try this first.

#2388143

Hi Waqar,

It is working now, after restting the PHP from 8.0.19 tot 7.4.29

#2388931

Thanks for the update and glad that it is sorted now.

You're welcome to mark this ticket as resolved and start a new one, for each new question or concern.

#2388933

My issue is resolved now. Thank you!

#2389139

I'd like to add here that the issue between the custom resizing of the images and PHP 8 is already reported and a fix is planned to be covered in the next release of Toolset Types (3.4.17).

For now, a patch is also available at:
https://toolset.com/errata/custom-sized-images-not-working-when-output-via-types-shortcode/