Image editor, doesn't show preview image (11 posts)

  1. saas
    Posted 2 years ago #

    Recently I had to do some image size adjustments on a project I am working currently, I noticed a strange issue, its not showing preview image on image editor screen.


    and it looks similar to this question,


    and same image as this one


    So please let me know how I can trace this issue, as I have reviewed debug log I don't see any errors (apart from notices etc not related to this issue).

  2. Borko
    Posted 2 years ago #

    So did you switch to the default theme? (it helped to a user in the topic you posted)
    Also, did you check functions.php?

  3. saas
    Posted 2 years ago #

    Yes I did change theme, and used default "Twenty Twelve" theme, and if I am using default theme and its not working means there is no point in checking functions.php.

    Also I am noticing issue with my image sizes list, as when I am inserting image into the post, its no longer showing me all sizes (default and custom) as a list in the media manager. Like bellow image shows


    Its only showing me full size, but no other sizes, according to solve this first I debugged code and found no trace of cause then I re-did all the site (re-created posts etc) and it was fine but today when I went to modify image sizes noticed this issue again.

    But when I review source I can see all the size listed there like:

    <# if ( 'undefined' !== typeof data.sizes ) { #>
    	<label class="setting">
    	<select class="size" name="size"
    	<# if ( data.userSettings ) { #>
    	<# } #>>
    	var size = data.sizes['thumbnail'];
    	if ( size ) { #>
    	<option value="thumbnail" >
    	Thumbnail &ndash; {{ size.width }} &times; {{ size.height }}
    	<# } #>
    	var size = data.sizes['medium'];
    	if ( size ) { #>
    		<option value="medium" >
    	Medium &ndash; {{ size.width }} &times; {{ size.height }}
    	<# } #>
    	and so on.......................
    		<# } #>
  4. saas
    Posted 2 years ago #

    Several hours ago I updated wordpress to 3.6, and activated twenty thirty theme and de-activated all the plugins and I still can't make both work.

    1) Preview Image on cropping area (image editor)
    2) Showing all the image sizes on media manager "Insert Image" section.

    both mentioned above :(.

  5. esmi
    Forum Moderator
    Posted 2 years ago #

    Site url?

  6. saas
    Posted 2 years ago #

    Sorry @esmi I can't provide url here.

    But the problem is in backend (wp-admin -> dashboard) what good it will be to have url?

  7. saas
    Posted 2 years ago #

    I just did some debugging again and here is the data,

        "success": true,
        "data": [{
            "id": some-id,
            "title": "some-title",
            "filename": "some-title.png",
            "sizes": {
                "full": {
                    "url": "http://mysite.com/wp-content/uploads/2013/07/some-title.png",
                    "height": 373,
                    "width": 1043,
                    "orientation": "landscape"
            "height": 373,
            "width": 1043,

    I am debugging more, but maybe you could help me how I can proceed further.

    Note: according to this response, its only fetching single size (full) so need to know why not all sizes.

    Note: I am also using "Simple Image Sizes" plugin, maybe it has screwed something, but I also tried deactivating and still same issue.

    Note: this is partial response data, I can't show all the data here.

  8. WPyogi
    Forum Moderator
    Posted 2 years ago #

    I am also using "Simple Image Sizes" plugin

    Yes, you need to test this by turning off ALL plugins and switching to the default theme.

  9. saas
    Posted 2 years ago #

    @WPyogi I have done this

    Yes, you need to test this by turning off ALL plugins and switching to the default theme.

    with wordpress 3.5.2 and did it again with 3.6 no luck.

  10. saas
    Posted 2 years ago #

    I just finished another phase of debugging core, and so far this is my analysis.

    I have narrowed it down to


    function wp_prepare_attachment_for_js($attachment);

    foreach ($possible_sizes as $size => $label) {}

    if I dump this $possible_sizes it shows all my custom sizes, but

    if ($downsize = apply_filters('image_downsize', false, $attachment->ID, $size)) {}

    this doesn't seem to work????

    So anybody?????

  11. saas
    Posted 2 years ago #

    One more thing I am noticing,

    I have cloned live site to my local server (WAMP) and I added new image into media using POST EDIT screen "Add Media" button it showed me all the custom sizes after uploading.

    But when I do same procedure on live site it only showing me FULL size image :(

    Is there anything related to this functionality which requires PHP libraries or extensions installed which causing wordpress to not show custom sizes.?????

    Note: In local server its also showing preview image on crop & scale screen link:


    What is this????

Topic Closed

This topic has been closed to new replies.

About this Topic