Viewing 12 replies - 16 through 27 (of 27 total)
  • Plugin Author OriginalEXE

    (@originalexe)

    Hello Fabian,

    thank you for your report, I am looking into this and will get back to you.

    Wow that was super fast – thank you!

    Plugin Author OriginalEXE

    (@originalexe)

    Hi,

    I just checked and WordPress by default does not show custom image sizes in the media insert dropdown, only default image sizes are displayed: Thumbnail, Medium, Large and Full.

    About the image sizes being generated on selecting the full size, I am not able to reproduce this here in my testing. Would you be able to provide me with the copy of your custom theme so that I can test this locally?

    About the selecting image sizes thingy, I am not sure how this could be properly done. The thing is, for custom image sizes to appear there, you would have to create them first, as they have to be created for them to appear in that dropdown (so that they can immediately me inserted in the post content).

    Hey!

    True, I forgot about that. To add the custom image sizes (resp. the ones I need) to the dropdown, I added the following lines to my functions file:

    function add_custom_image_sizes($sizes) {
        return array_merge( $sizes, array(
            'blogimage' => __('Blog'),
            'blogimagehalf' => __('Blog (halfwidth)'),
            'portfolioimage' => __('Portfolio'),
            'portfolioimagehalf' => __('Portfolio (halfwidth)')
        ) );
    }
    add_filter('image_size_names_choose', 'add_custom_image_sizes');

    These custom sizes are defined as follows:

    add_image_size('blogimage', 778, 0);
    add_image_size('blogimagehalf', 379, 0);
    add_image_size('portfolioimage', 1166, 0);
    add_image_size('portfolioimagehalf', 573, 0);

    Please let me know if this is of any help.

    I have uploaded my theme to my Dropbox. Here’s the link: https://www.dropbox.com/s/usm9pgbuvic1xwi/fabians2015.zip?dl=0
    (please let me know when you have downloaded the zip archive, so I can delete it afterwards.)

    Best regards,
    Fabian

    Plugin Author OriginalEXE

    (@originalexe)

    Hi Fabian,

    theme downloaded, you can delete it from the dropbox now, thanks.

    Looking into this, will get back to you.

    Thank YOU very much!

    Plugin Author OriginalEXE

    (@originalexe)

    Hi, I have good news and bad news.

    Good news is that I figured out why plugin caused your custom image sizes to stop showing in the dropdown even though you added them through the filter.

    Bad news is that I can’t stop the WP from generating those sizes for each image in your Media. So any size you add via filter will always be generated as soon as you open the media dialog (unless they are already generated ofc).

    I guess the workaround would be to always perform the media cleanup after you finish using the media dialog in your editor, but that’s a shi**y workaround. I don’t see any other way.

    I will release the update to the plugin soon that fixes the issue of custom sizes not showing up in the dropdown.

    Hello

    Thanks for looking into it! So are you talking about these few image sizes I want to have in the dropdown? Because when I tested your plugin with my theme, only a few image sizes were generated for each uploaded image, not all the ~15 image sizes. I guess I could live with 4 image sizes being generated for each image after upload – way better than have all image sizes generated.

    Thanks,
    Fabian

    Plugin Author OriginalEXE

    (@originalexe)

    Hi,

    correct, these will be generated for each image:

    'blogimage' => __('Blog'),
    'blogimagehalf' => __('Blog (halfwidth)'),
    'portfolioimage' => __('Portfolio'),
    'portfolioimagehalf' => __('Portfolio (halfwidth)')

    Unfortunately, there is no (sane) way around it, as WP needs to have them generated in order to even have them show up in the dropdown.

    Update should be out soon.

    Great, thank you! That’s far better than what I had before your plugin!

    Plugin Author OriginalEXE

    (@originalexe)

    Hi, new version should be available for the update. Let me know if you find any issue with it.

    Thanks, I’ve just installed the update and it seems to work so far.

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘breaks image size choosing’ is closed to new replies.