Skip Navigation

[Résolu] Upscale images using types image custom size shortcode

This support ticket is created Il y a 5 années et 4 mois. 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
- 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)

Marqué : 

This topic contains 1 réponse, has 2 voix.

Last updated by Luo Yang Il y a 5 années et 4 mois.

Assisted by: Luo Yang.

Auteur
Publications
#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"]
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.