We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Programmatically created channel entry with Safecracker file field has no thumbnail

Development and Programming

chichilatte's avatar
chichilatte
43 posts
13 years ago
chichilatte's avatar chichilatte

I’m trying to create a new channel entry programmatically with php, which works fine, except for a Safecracker file field (I’m setting it to a CURLed image from Gravatar). My problem is that the image’s thumb isn’t being created. My code goes something like this…

$entry = array(
 'channel_id' => $channel_id,
 'entry_id'   => '',

 // some more fields in here, but not relevant to this issue

 'field_id_19' => 'https://ellislab.com/asset/images/pronet-logo/new_picture.jpg'
 );
$submit_result = $this->EE->api_channel_entries->submit_new_entry($channel_id, $entry);

If the image already has a thumb at “_thumbs/new_picture.jpg” everything works well, otherwise i start to see broken image icons all over the place (crucially, including images resized with the Image Sizer add-on).

Is this the intended behaviour / any suggestions?

Setup: EE2.4.0, server wizard says everything is compatible, _thumbs folder is 777, resizing works for user-uploaded images

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.