this node endpoint - http://cms.tripchi.com/drupalgap/node/35921 - in my Service includes...
field_photo: {
und: [
{
fid: "810",
uid: "1",
filename: "dxb-airport_1.jpg",
uri: "public://dxb-airport_1.jpg",
filemime: "image/jpeg",
filesize: "64389",
status: "1",
timestamp: "1408433735",
uuid: "697b5fd7-a968-4f6d-b5a0-558ff0f76680",
rdf_mapping: [ ],
alt: "DXB",
title: "DXB Airport",
width: "390",
height: "270"
}
]
},...
using javascript - similiar to this http://cms.tripchi.com/mobile-app/js/index.js - I want to be able to request the large/medium/small dimensions of this public image dynamically - without changing the field_photo's settings in Drupal's.
I have the content-type's image style configured per the image below:
When the field's "Preview image style" is set to "Thumbnail (100x100)", I can do
var size = 'thumbnail';
sDomain + '/sites/default/files/styles/'+size+'/public/' + utils.getLang('field_photo', obj, 'uri');
However, when I change the size variable to 'large', I get an Access Denied error.
Changing the field_photo settings to the "Large (480x480)" size does fix that, but I only want this size returned for the API via JavaScript and this changings the Drupal's front-end view/template as well.
When I change the API's Display-Suite I get no difference to what the API returns and manually reconstructing the URL with 'large' still returns Access Denied.
Is there a way to expose requesting multiple image sizes without changing Drupal's field configurations? I would accept a solution that includes a Drupal hook to create the other image sizes on the presence of a parameter.