Skip Navigation

[Resolved] Custom field – Image Upload – Need to get resized URL value, image-50×50.jpg

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Tagged: 

This topic contains 2 replies, has 1 voice.

Last updated by kennethS-2 9 years, 1 month ago.

Author
Posts
#287105

I am trying to:
When a custom field of image is used to upload an image, i need the file reference for the registered sized image. I.E i have a custom image dimensions of 900x400 registered, when a user uploads their own photo i need the URL of the image.jpg with the image-900x400.jpg part of the ref, how do i do this?

I am current using $image1 = types_render_field("company-image-1", array("raw"=>"true"));, what i have is a section for up 10 images to be uploaded, i am then loading these into royal slider which requires the following code:

<a class="rsImg bugaga" data-rsbigimg="'.$image1.'" href="'.$image1.'"><img class="rsTmb" src="'.$image1.'" /></a>

But i need the value of $image1 to be not just:
hidden link

But the actual resized file ref:

hidden link

Is this possible?

Thanks,

Tralisk

#287106

Wow, dont click on the image ref's above, it auto hyperlinked to a salesforce website, not my intention, though impressive to know that salesforce have bought site.com and are redirecting!!!

#287108

Nevermind, i was being blinded by my own ignorance,

solution:
$image1 = types_render_field("company-image-1", array("url"=>"true","height"=>"400","width"=>"900","resize"=>"crop"));

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.