Skip Navigation

[Resolved] Upscale images using types image custom size shortcode

This support ticket is created 6 years 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/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 6 years ago.

Assisted by: Luo Yang.

Author
Posts
#1170794

I'm inserting images using this shortcode:

[types field='studio-images' title='%%TITLE%%' alt='%%ALT%%' size='custom' width='1200' height='800' resize='proportional'][/types]

Is it possible to get it to upscale images as well? You can see an example of the issue i'm trying to solve here: hidden link

Images on that are inserted using the above shortcode.

#1171112

Hello,

What is the "upscale image"?
Are you going to display those images as 1200 * 800?

If it is, you can add a CSS class to the image shortcode, for example: add CSS class name "my-image"
[types field='studio-images' title='%%TITLE%%' alt='%%ALT%%' size='custom' width='1200' height='800' resize='proportional' class="my-image"][/types]

Then use CSS codes to customize the CSS class "my-image", like this:

img.my-image{
width: 1200px;
height: 800px;
}

More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/#image
click link "Usage examples", there is an example codes:

[types field="my-image" alt="blue bird" title="Acme logo" class="my-class1 myclass2" style="border:1px solid black;padding:20px" size="thumbnail"]