wp_get_image_editor and updating metadata and thumbnail references

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

wp_get_image_editor and updating metadata and thumbnail references

BenderisGreat
This post was updated on .
I am making use of the wp_get_image_editor, but am finding the resized image does not get saved into the media library, or with any metadata, etc...  Is there a way to store the newly resized images in the library and update the original image references so the new resized image is referenced as a custom size? Maybe by name, rather than thumbnail call it newsizethumb, for example.

Read a little more about adding an image size- so I can make my question more specific here.  After resizing, and saving the image, how do I go about using the newly saved image file to update a speciic thumbnail size?

if ( function_exists( 'add_theme_support' ) ) {
        add_theme_support( 'post-thumbnails' );
}

if ( function_exists( 'add_image_size' ) ) {
        add_image_size( 'custom-size', 300, 9999 ); //300 pixels wide (and unlimited height)
}

$img = wp_get_image_editor( ABSPATH. '/dir/dir/file.png' );
    if ( ! is_wp_error( $img ) ) {
        $old_size = $img->get_size();
        $crop = $img->crop( 130, 110, 107, 145, NULL, NULL, false );
        if ($crop !== FALSE) {
            $new_size = $img->get_size();
            echo "New width: ".$new_size['width']."<br>";
            echo "New height: ".$new_size['height']."<br>";
            $saved = $img->save();
   
           
            **** Here is where I would need to update the custom thumbnail size with this newly generated thumbnail.   Maybe I can hook into wp_generate_attachment_metadata and add a custom image there?  I dont see any default options for this, or to crop specific thumbnail sizes to unique axis' ****
        }
}
Reply | Threaded
Open this post in threaded view
|

Re: wp_get_image_editor and updating metadata and thumbnail references

Marko Heijnen
This because WP_Image_Editor isn’t for that. It only does resizing and you have to do the storing yourself.
You could look into https://github.com/markoheijnen/WP_Image.

Marko

Op 17 feb. 2014, om 12:33 heeft BenderisGreat <[hidden email]> het volgende geschreven:

> I am making use of the wp_get_image_editor, but am finding the resized image
> does not get saved into the media library, or with any metadata, etc...  Is
> there a way to store the newly resized images in the library and update the
> original image references so the new resized image is referenced as a custom
> size? Maybe by name, rather than thumbnail call it newsizethumb, for
> example.
>
>
>
> --
> View this message in context: http://wordpress-hackers.1065353.n5.nabble.com/wp-get-image-editor-and-updating-metadata-and-thumbnail-references-tp43358.html
> Sent from the Wordpress Hackers mailing list archive at Nabble.com.
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: wp_get_image_editor and updating metadata and thumbnail references

BenderisGreat
So an unset or array_push wont work here?  I just need to swamp one image
for another in the sizes array

On Monday, February 17, 2014, Marko Heijnen <[hidden email]> wrote:

> This because WP_Image_Editor isn't for that. It only does resizing and you
> have to do the storing yourself.
> You could look into https://github.com/markoheijnen/WP_Image.
>
> Marko
>
> Op 17 feb. 2014, om 12:33 heeft BenderisGreat <[hidden email]<javascript:;>>
> het volgende geschreven:
>
> > I am making use of the wp_get_image_editor, but am finding the resized
> image
> > does not get saved into the media library, or with any metadata, etc...
>  Is
> > there a way to store the newly resized images in the library and update
> the
> > original image references so the new resized image is referenced as a
> custom
> > size? Maybe by name, rather than thumbnail call it newsizethumb, for
> > example.
> >
> >
> >
> > --
> > View this message in context:
> http://wordpress-hackers.1065353.n5.nabble.com/wp-get-image-editor-and-updating-metadata-and-thumbnail-references-tp43358.html
> > Sent from the Wordpress Hackers mailing list archive at Nabble.com.
> > _______________________________________________
> > wp-hackers mailing list
> > [hidden email] <javascript:;>
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> [hidden email] <javascript:;>
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: wp_get_image_editor and updating metadata and thumbnail references

BenderisGreat
Well, if anyone does know of a way to do this, the assistance would be
appreciated.  I looked through some plugin code that works to replace the
image size 'file' field witha custom image name of the same size, and it
works for them. I just dont understand it.


On Mon, Feb 17, 2014 at 11:33 AM, Gregory Lancaster <
[hidden email]> wrote:

> So an unset or array_push wont work here?  I just need to swamp one image
> for another in the sizes array
>
>
> On Monday, February 17, 2014, Marko Heijnen <[hidden email]>
> wrote:
>
>> This because WP_Image_Editor isn't for that. It only does resizing and
>> you have to do the storing yourself.
>> You could look into https://github.com/markoheijnen/WP_Image.
>>
>> Marko
>>
>> Op 17 feb. 2014, om 12:33 heeft BenderisGreat <[hidden email]>
>> het volgende geschreven:
>>
>> > I am making use of the wp_get_image_editor, but am finding the resized
>> image
>> > does not get saved into the media library, or with any metadata, etc...
>>  Is
>> > there a way to store the newly resized images in the library and update
>> the
>> > original image references so the new resized image is referenced as a
>> custom
>> > size? Maybe by name, rather than thumbnail call it newsizethumb, for
>> > example.
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://wordpress-hackers.1065353.n5.nabble.com/wp-get-image-editor-and-updating-metadata-and-thumbnail-references-tp43358.html
>> > Sent from the Wordpress Hackers mailing list archive at Nabble.com.
>> > _______________________________________________
>> > wp-hackers mailing list
>> > [hidden email]
>> > http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>> _______________________________________________
>> wp-hackers mailing list
>> [hidden email]
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: wp_get_image_editor and updating metadata and thumbnail references

Marko Heijnen
You can use wp_get_attachment_metadata() and wp_update_attachment_metadata() for that.
Read the data, do the image manipulation and if it worked save the data.

Op 17 feb. 2014, om 22:09 heeft Gregory Lancaster <[hidden email]> het volgende geschreven:

> Well, if anyone does know of a way to do this, the assistance would be
> appreciated.  I looked through some plugin code that works to replace the
> image size 'file' field witha custom image name of the same size, and it
> works for them. I just dont understand it.
>
>
> On Mon, Feb 17, 2014 at 11:33 AM, Gregory Lancaster <
> [hidden email]> wrote:
>
>> So an unset or array_push wont work here?  I just need to swamp one image
>> for another in the sizes array
>>
>>
>> On Monday, February 17, 2014, Marko Heijnen <[hidden email]>
>> wrote:
>>
>>> This because WP_Image_Editor isn't for that. It only does resizing and
>>> you have to do the storing yourself.
>>> You could look into https://github.com/markoheijnen/WP_Image.
>>>
>>> Marko
>>>
>>> Op 17 feb. 2014, om 12:33 heeft BenderisGreat <[hidden email]>
>>> het volgende geschreven:
>>>
>>>> I am making use of the wp_get_image_editor, but am finding the resized
>>> image
>>>> does not get saved into the media library, or with any metadata, etc...
>>> Is
>>>> there a way to store the newly resized images in the library and update
>>> the
>>>> original image references so the new resized image is referenced as a
>>> custom
>>>> size? Maybe by name, rather than thumbnail call it newsizethumb, for
>>>> example.
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>> http://wordpress-hackers.1065353.n5.nabble.com/wp-get-image-editor-and-updating-metadata-and-thumbnail-references-tp43358.html
>>>> Sent from the Wordpress Hackers mailing list archive at Nabble.com.
>>>> _______________________________________________
>>>> wp-hackers mailing list
>>>> [hidden email]
>>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>
>>> _______________________________________________
>>> wp-hackers mailing list
>>> [hidden email]
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>
>>
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: wp_get_image_editor and updating metadata and thumbnail references

BenderisGreat
Thanks Marko, My issue is my unset, and array_push isnt sticking.  I can
get the new array of information in the array, but when I run
wp_update_attachment_metadata()
with my new array, nothing updates. I think my understanding of how to work
with arrays is just not good enough.  Reading up on it though.


On Mon, Feb 17, 2014 at 1:24 PM, Marko Heijnen <[hidden email]>wrote:

> You can use wp_get_attachment_metadata() and
> wp_update_attachment_metadata() for that.
> Read the data, do the image manipulation and if it worked save the data.
>
> Op 17 feb. 2014, om 22:09 heeft Gregory Lancaster <
> [hidden email]> het volgende geschreven:
>
> > Well, if anyone does know of a way to do this, the assistance would be
> > appreciated.  I looked through some plugin code that works to replace the
> > image size 'file' field witha custom image name of the same size, and it
> > works for them. I just dont understand it.
> >
> >
> > On Mon, Feb 17, 2014 at 11:33 AM, Gregory Lancaster <
> > [hidden email]> wrote:
> >
> >> So an unset or array_push wont work here?  I just need to swamp one
> image
> >> for another in the sizes array
> >>
> >>
> >> On Monday, February 17, 2014, Marko Heijnen <[hidden email]>
> >> wrote:
> >>
> >>> This because WP_Image_Editor isn't for that. It only does resizing and
> >>> you have to do the storing yourself.
> >>> You could look into https://github.com/markoheijnen/WP_Image.
> >>>
> >>> Marko
> >>>
> >>> Op 17 feb. 2014, om 12:33 heeft BenderisGreat <
> [hidden email]>
> >>> het volgende geschreven:
> >>>
> >>>> I am making use of the wp_get_image_editor, but am finding the resized
> >>> image
> >>>> does not get saved into the media library, or with any metadata,
> etc...
> >>> Is
> >>>> there a way to store the newly resized images in the library and
> update
> >>> the
> >>>> original image references so the new resized image is referenced as a
> >>> custom
> >>>> size? Maybe by name, rather than thumbnail call it newsizethumb, for
> >>>> example.
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> View this message in context:
> >>>
> http://wordpress-hackers.1065353.n5.nabble.com/wp-get-image-editor-and-updating-metadata-and-thumbnail-references-tp43358.html
> >>>> Sent from the Wordpress Hackers mailing list archive at Nabble.com.
> >>>> _______________________________________________
> >>>> wp-hackers mailing list
> >>>> [hidden email]
> >>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>>
> >>> _______________________________________________
> >>> wp-hackers mailing list
> >>> [hidden email]
> >>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>>
> >>
> > _______________________________________________
> > wp-hackers mailing list
> > [hidden email]
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: wp_get_image_editor and updating metadata and thumbnail references

Marko Heijnen
If you want to swap an image then unset and/or array_push. You can just find the location in the array and change the value.

Op 17 feb. 2014, om 22:27 heeft Gregory Lancaster <[hidden email]> het volgende geschreven:

> Thanks Marko, My issue is my unset, and array_push isnt sticking.  I can
> get the new array of information in the array, but when I run
> wp_update_attachment_metadata()
> with my new array, nothing updates. I think my understanding of how to work
> with arrays is just not good enough.  Reading up on it though.
>
>
> On Mon, Feb 17, 2014 at 1:24 PM, Marko Heijnen <[hidden email]>wrote:
>
>> You can use wp_get_attachment_metadata() and
>> wp_update_attachment_metadata() for that.
>> Read the data, do the image manipulation and if it worked save the data.
>>
>> Op 17 feb. 2014, om 22:09 heeft Gregory Lancaster <
>> [hidden email]> het volgende geschreven:
>>
>>> Well, if anyone does know of a way to do this, the assistance would be
>>> appreciated.  I looked through some plugin code that works to replace the
>>> image size 'file' field witha custom image name of the same size, and it
>>> works for them. I just dont understand it.
>>>
>>>
>>> On Mon, Feb 17, 2014 at 11:33 AM, Gregory Lancaster <
>>> [hidden email]> wrote:
>>>
>>>> So an unset or array_push wont work here?  I just need to swamp one
>> image
>>>> for another in the sizes array
>>>>
>>>>
>>>> On Monday, February 17, 2014, Marko Heijnen <[hidden email]>
>>>> wrote:
>>>>
>>>>> This because WP_Image_Editor isn't for that. It only does resizing and
>>>>> you have to do the storing yourself.
>>>>> You could look into https://github.com/markoheijnen/WP_Image.
>>>>>
>>>>> Marko
>>>>>
>>>>> Op 17 feb. 2014, om 12:33 heeft BenderisGreat <
>> [hidden email]>
>>>>> het volgende geschreven:
>>>>>
>>>>>> I am making use of the wp_get_image_editor, but am finding the resized
>>>>> image
>>>>>> does not get saved into the media library, or with any metadata,
>> etc...
>>>>> Is
>>>>>> there a way to store the newly resized images in the library and
>> update
>>>>> the
>>>>>> original image references so the new resized image is referenced as a
>>>>> custom
>>>>>> size? Maybe by name, rather than thumbnail call it newsizethumb, for
>>>>>> example.
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>
>> http://wordpress-hackers.1065353.n5.nabble.com/wp-get-image-editor-and-updating-metadata-and-thumbnail-references-tp43358.html
>>>>>> Sent from the Wordpress Hackers mailing list archive at Nabble.com.
>>>>>> _______________________________________________
>>>>>> wp-hackers mailing list
>>>>>> [hidden email]
>>>>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>>>
>>>>> _______________________________________________
>>>>> wp-hackers mailing list
>>>>> [hidden email]
>>>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>>>
>>>>
>>> _______________________________________________
>>> wp-hackers mailing list
>>> [hidden email]
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>> _______________________________________________
>> wp-hackers mailing list
>> [hidden email]
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: wp_get_image_editor and updating metadata and thumbnail references

BenderisGreat
Thank you for offering your help, believe me I appreciate it.  I got the
data updating, but this code seems really ineffecient.  However I owe you a
thanks, I took your advice on finding the location and just named it
directly.

$attachmentMetaData = wp_get_attachment_metadata($lastImage['id'], false);

$replaceWith = array (
  'file' => 'testing_array_replace.jpg',
  'width' => 500,
  'height' => 500,
  'mime-type' => 'image/jpeg'
);


if ($attachmentMetaData) {
    $attachmentMetaData['sizes']['User Crop']['file'] =
$replaceWith['file'];
    $attachmentMetaData['sizes']['User Crop']['width'] =
$replaceWith['width'];
    $attachmentMetaData['sizes']['User Crop']['height'] =
$replaceWith['height'];
    $attachmentMetaData['sizes']['User Crop']['mime-type'] =
$replaceWith['mime-type'];

   wp_update_attachment_metadata($firstImage['id'],$newArray );
}




On Mon, Feb 17, 2014 at 1:31 PM, Marko Heijnen <[hidden email]>wrote:

> If you want to swap an image then unset and/or array_push. You can just
> find the location in the array and change the value.
>
> Op 17 feb. 2014, om 22:27 heeft Gregory Lancaster <
> [hidden email]> het volgende geschreven:
>
> > Thanks Marko, My issue is my unset, and array_push isnt sticking.  I can
> > get the new array of information in the array, but when I run
> > wp_update_attachment_metadata()
> > with my new array, nothing updates. I think my understanding of how to
> work
> > with arrays is just not good enough.  Reading up on it though.
> >
> >
> > On Mon, Feb 17, 2014 at 1:24 PM, Marko Heijnen <[hidden email]
> >wrote:
> >
> >> You can use wp_get_attachment_metadata() and
> >> wp_update_attachment_metadata() for that.
> >> Read the data, do the image manipulation and if it worked save the data.
> >>
> >> Op 17 feb. 2014, om 22:09 heeft Gregory Lancaster <
> >> [hidden email]> het volgende geschreven:
> >>
> >>> Well, if anyone does know of a way to do this, the assistance would be
> >>> appreciated.  I looked through some plugin code that works to replace
> the
> >>> image size 'file' field witha custom image name of the same size, and
> it
> >>> works for them. I just dont understand it.
> >>>
> >>>
> >>> On Mon, Feb 17, 2014 at 11:33 AM, Gregory Lancaster <
> >>> [hidden email]> wrote:
> >>>
> >>>> So an unset or array_push wont work here?  I just need to swamp one
> >> image
> >>>> for another in the sizes array
> >>>>
> >>>>
> >>>> On Monday, February 17, 2014, Marko Heijnen <[hidden email]>
> >>>> wrote:
> >>>>
> >>>>> This because WP_Image_Editor isn't for that. It only does resizing
> and
> >>>>> you have to do the storing yourself.
> >>>>> You could look into https://github.com/markoheijnen/WP_Image.
> >>>>>
> >>>>> Marko
> >>>>>
> >>>>> Op 17 feb. 2014, om 12:33 heeft BenderisGreat <
> >> [hidden email]>
> >>>>> het volgende geschreven:
> >>>>>
> >>>>>> I am making use of the wp_get_image_editor, but am finding the
> resized
> >>>>> image
> >>>>>> does not get saved into the media library, or with any metadata,
> >> etc...
> >>>>> Is
> >>>>>> there a way to store the newly resized images in the library and
> >> update
> >>>>> the
> >>>>>> original image references so the new resized image is referenced as
> a
> >>>>> custom
> >>>>>> size? Maybe by name, rather than thumbnail call it newsizethumb, for
> >>>>>> example.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> View this message in context:
> >>>>>
> >>
> http://wordpress-hackers.1065353.n5.nabble.com/wp-get-image-editor-and-updating-metadata-and-thumbnail-references-tp43358.html
> >>>>>> Sent from the Wordpress Hackers mailing list archive at Nabble.com.
> >>>>>> _______________________________________________
> >>>>>> wp-hackers mailing list
> >>>>>> [hidden email]
> >>>>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>>>>
> >>>>> _______________________________________________
> >>>>> wp-hackers mailing list
> >>>>> [hidden email]
> >>>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>>>>
> >>>>
> >>> _______________________________________________
> >>> wp-hackers mailing list
> >>> [hidden email]
> >>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> >> _______________________________________________
> >> wp-hackers mailing list
> >> [hidden email]
> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> > _______________________________________________
> > wp-hackers mailing list
> > [hidden email]
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: wp_get_image_editor and updating metadata and thumbnail references

Marko Heijnen
Thinking about it, you never could have used array_push() due the fact that it is an associative array.
This would be the same and simpler.

$attachmentMetaData['sizes']['User Crop’] = $replaceWith;

Marko

Op 17 feb. 2014, om 23:03 heeft Gregory Lancaster <[hidden email]> het volgende geschreven:

> Thank you for offering your help, believe me I appreciate it.  I got the
> data updating, but this code seems really ineffecient.  However I owe you a
> thanks, I took your advice on finding the location and just named it
> directly.
>
> $attachmentMetaData = wp_get_attachment_metadata($lastImage['id'], false);
>
> $replaceWith = array (
>  'file' => 'testing_array_replace.jpg',
>  'width' => 500,
>  'height' => 500,
>  'mime-type' => 'image/jpeg'
> );
>
>
> if ($attachmentMetaData) {
>    $attachmentMetaData['sizes']['User Crop']['file'] =
> $replaceWith['file'];
>    $attachmentMetaData['sizes']['User Crop']['width'] =
> $replaceWith['width'];
>    $attachmentMetaData['sizes']['User Crop']['height'] =
> $replaceWith['height'];
>    $attachmentMetaData['sizes']['User Crop']['mime-type'] =
> $replaceWith['mime-type'];
>
>   wp_update_attachment_metadata($firstImage['id'],$newArray );
> }
>
>
>
>
> On Mon, Feb 17, 2014 at 1:31 PM, Marko Heijnen <[hidden email]>wrote:
>
>> If you want to swap an image then unset and/or array_push. You can just
>> find the location in the array and change the value.
>>
>> Op 17 feb. 2014, om 22:27 heeft Gregory Lancaster <
>> [hidden email]> het volgende geschreven:
>>
>>> Thanks Marko, My issue is my unset, and array_push isnt sticking.  I can
>>> get the new array of information in the array, but when I run
>>> wp_update_attachment_metadata()
>>> with my new array, nothing updates. I think my understanding of how to
>> work
>>> with arrays is just not good enough.  Reading up on it though.
>>>
>>>
>>> On Mon, Feb 17, 2014 at 1:24 PM, Marko Heijnen <[hidden email]
>>> wrote:
>>>
>>>> You can use wp_get_attachment_metadata() and
>>>> wp_update_attachment_metadata() for that.
>>>> Read the data, do the image manipulation and if it worked save the data.
>>>>
>>>> Op 17 feb. 2014, om 22:09 heeft Gregory Lancaster <
>>>> [hidden email]> het volgende geschreven:
>>>>
>>>>> Well, if anyone does know of a way to do this, the assistance would be
>>>>> appreciated.  I looked through some plugin code that works to replace
>> the
>>>>> image size 'file' field witha custom image name of the same size, and
>> it
>>>>> works for them. I just dont understand it.
>>>>>
>>>>>
>>>>> On Mon, Feb 17, 2014 at 11:33 AM, Gregory Lancaster <
>>>>> [hidden email]> wrote:
>>>>>
>>>>>> So an unset or array_push wont work here?  I just need to swamp one
>>>> image
>>>>>> for another in the sizes array
>>>>>>
>>>>>>
>>>>>> On Monday, February 17, 2014, Marko Heijnen <[hidden email]>
>>>>>> wrote:
>>>>>>
>>>>>>> This because WP_Image_Editor isn't for that. It only does resizing
>> and
>>>>>>> you have to do the storing yourself.
>>>>>>> You could look into https://github.com/markoheijnen/WP_Image.
>>>>>>>
>>>>>>> Marko
>>>>>>>
>>>>>>> Op 17 feb. 2014, om 12:33 heeft BenderisGreat <
>>>> [hidden email]>
>>>>>>> het volgende geschreven:
>>>>>>>
>>>>>>>> I am making use of the wp_get_image_editor, but am finding the
>> resized
>>>>>>> image
>>>>>>>> does not get saved into the media library, or with any metadata,
>>>> etc...
>>>>>>> Is
>>>>>>>> there a way to store the newly resized images in the library and
>>>> update
>>>>>>> the
>>>>>>>> original image references so the new resized image is referenced as
>> a
>>>>>>> custom
>>>>>>>> size? Maybe by name, rather than thumbnail call it newsizethumb, for
>>>>>>>> example.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>
>>>>
>> http://wordpress-hackers.1065353.n5.nabble.com/wp-get-image-editor-and-updating-metadata-and-thumbnail-references-tp43358.html
>>>>>>>> Sent from the Wordpress Hackers mailing list archive at Nabble.com.
>>>>>>>> _______________________________________________
>>>>>>>> wp-hackers mailing list
>>>>>>>> [hidden email]
>>>>>>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> wp-hackers mailing list
>>>>>>> [hidden email]
>>>>>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> wp-hackers mailing list
>>>>> [hidden email]
>>>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>>
>>>> _______________________________________________
>>>> wp-hackers mailing list
>>>> [hidden email]
>>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>>
>>> _______________________________________________
>>> wp-hackers mailing list
>>> [hidden email]
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>> _______________________________________________
>> wp-hackers mailing list
>> [hidden email]
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers