Saltar navegación

[Resuelto] Resize image in custom field for REST API

This support ticket is created hace 4 años, 1 mes. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Minesh hace 4 años, 1 mes.

Asistido por: Minesh.

Autor
Mensajes
#1867717

is it posible to resize image that user upload with a post-form?
I have a form, where user create their custom post 'comercios'. in this form they can upload logo and image gallery

but they upload whatever they want

i need that this image resize and its don't weigh much
because its may show in web an in APP, and in APP api is very slow with this type of image

The APP is using REST API

#1869905

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Jamal is off. This is Minesh here and I'll take care of this ticket. Hope this is OK.

I'm not sure if you checked Toolset integration with REST API Doc:
=> https://toolset.com/documentation/programmer-reference/toolset-integration-with-the-rest-api/

If you check the field type and it's value format table, for image field Toolset returns the attachment ID for the image field not the resize image URL.
=> https://toolset.com/documentation/programmer-reference/toolset-integration-with-the-rest-api/#field-types-and-their-value-format-in-rest-api

To have a resized image URL in your REST API response you will require to add your own custom code and that is beyond the scope of our support policy.

I suggest contacting REST API pro who should help you to achieve this.