• Hi,

    I am using WordPress 5.2.2 with whatever editor it comes with as standard (gutenburg?) on Bluehost, with a handful of common plugins. I have been coming up against the following problem.

    When I edit a post or create a new post, and insert images (upload or from media lib)

    a) for some images the Image Size (Thumb, Med, Large) and Image Dimensions setting are both displayed in the Image Settings pane.

    b) for other images ONLY the Image dimensions option is shown – NO Image Size.

    I cannot figure out why or what the difference is – it seems to happen regardless if the image is hi-res or low res and could be different behaviors for two similar res/size images or even the same image in different image block instances.

    I have not found any other reports of this behavior in google/forum searching.

    I am concerned this means my page will load full-res image and scale them down for all those instances. I have some very photo rich posts and do not want to manually edit the HTML for every affected image block to point to the scaled image SRC.

    Changing the HTML of the image block so that both examples a) and b) match does not seem to change the available options given in wordpress editor image setting pane.

    I disable my CSS optimisation and also disabled my theme reverting back to twenty-nineteen and this did not change the described behavior.

    Please advise if I can provide additional troubleshooting information or if this is a known issue is there any workaround?

    In the example post:
    Images 1, 2, 4 do no show image size (only image dimension).
    Images 3, 5, 6 , 7 show both image size and image dimension allowing me to set correct scaling.
    Images 3 and 4 are similar res, similar size, consecutive from the same camera.

    Regards,

    Hayden

    PS I would also like to know if there is an automatic/blanket way to set the image link to media as the full-res file, so that lightbox plugins will load the full-res file. WordPress ALWAYS defaults it to the chosen scale size for the image block in the post. At the moment I cannot find any way to work around this without manually editing every image instance in all the pages I wish to use a lightbox.

    • This topic was modified 5 years, 3 months ago by htweedley.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator bcworkz

    (@bcworkz)

    I’m unable to replicate your experience on my site under various scenarios which I thought could make a difference, like attached or attached to a different post, unattached, big size, normal size, etc. I always get all settings.

    On a post edit screen where the image size setting is missing, use your browser’s element inspector developer tool to examine source HTML in the settings pane. If the HTML (a select/option structure) is there despite not being visible, you have a CSS issue. If the HTML itself is gone, you might have a theme or plugin conflict. Try disabling all plugins and switch to twentynineteen theme. I would expect the settings to all be there then.

    If not, and your hosting plan is a dedicated WP plan or you used a one-click install button, you are possibly using a host modified WP installation that has some, uh… “quirks”. While it’s no excuse for the field not being available, you could place appropriate dimensions in the fields you do have available, or use the percentage buttons. Even if you left things alone and a large image is placed in the post, it’s not as bad as you might think. The img tag has srcset and sizes attributes that allow the browser to fetch an appropriate size image regardless of the image URL provided as the src attribute.

    Thread Starter htweedley

    (@htweedley)

    Thanks BCWorkz.

    The plan is a dedicated wordpress plan on Bluehost. It came with WP already installed ready to go.

    I inspected the code for the image settings pane. The following code block is either entirely present or entirely missing:

    `<div class=”components-base-control”><div class=”components-base-control__field”><label class=”components-base-control__label” for=”inspector-select-control-56″>Image Size</label><select id=”inspector-select-control-56″ class=”components-select-control__input”><option value=”https://cursedascent.com/wp-content/uploads/2019/08/great-roof-second-attempt-150×150.jpg”>Thumbnail</option><option value=”https://cursedascent.com/wp-content/uploads/2019/08/great-roof-second-attempt-300×225.jpg”>Medium</option><option value=”https://cursedascent.com/wp-content/uploads/2019/08/great-roof-second-attempt-1024×768.jpg”>Large</option><option value=”https://cursedascent.com/wp-content/uploads/2019/08/great-roof-second-attempt.jpg”>Full Size</option></select></div></div>

    I tried pasting the original image file URL from “bad” image block to a new image block, and it still resulted in no image size drop-down displayed.

    I tried pasting the URL of a “good” image block into a new image block and it resulted in a “bad” image block.

    I tried duplicating a good image block and then changing the URL to a “bad” image and this was OKAY result.

    I tried disabling ALL plugins and reverting to twenty-nineteen theme – still the same behavior in my existing posts; however i did not recreate the issue in a new post although I only tried adding five images. On one post the issue manifests in the first couple of images, on another it does not manifest until 29 images into the post.

    Something interesting is I migrated two affected posts and the website itself from wordpress.com and looking at the originals in wordpress.com editor ALL images are OK with correct sizing menus. On my migrated .ORG site, the image size problem is apparent on both migrated posts and new posts.

    EDIT:

    I tried reverting to classic editor and found SOME of the funny image blocks had size flagged as “custom” but were equal to the “large” size in block editor. I manually set these to large, then re-activated block editor. Re-opening the post showed errors on those blocks, but I could select ‘resolve’>’convert to block’. The end result was that the “image size” drop down re-appeared and was set to large.

    Some OTHER funny image blocks did not show ANY size options in the classic editor.

    I am struggling to find any consistency or patterns here that I can hone in on to troubleshoot this issue.

    • This reply was modified 5 years, 3 months ago by htweedley.
    • This reply was modified 5 years, 3 months ago by htweedley.
    • This reply was modified 5 years, 3 months ago by htweedley.
    Moderator bcworkz

    (@bcworkz)

    I have a client who has Bluehost’s WP plan. I tried a few things on his site and got the full interface in all cases. Admittedly I didn’t try inserting 30 images hoping to induce a possible random error ??

    I think you’re on to something regarding custom image sizes. Entirely speculative and unverified, but I can imagine that if an image’s attributes indicate it has a custom image size, but the image size is no longer defined in code with add_image_size(), that the generation of the usual size dropdown field could fail due to missing data regarding that undefined image size.

    I can imagine two possible solutions. One is to add the missing image size back in. For the missing size to show up properly in the UI, more than add_image_size() is involved, but the necessary code is still not that involved. The drawback is all future image uploads will generate an extra size that you may not have any use for now. You do need to know the exact size name used. It might literally be “custom”.

    The other possible solution is to use one of those plugins that regenerates all image sizes given the current size settings. That should eliminate all conflicts in attachment meta. I’ve no experience with such plugins, so I cannot recommend any. I’m not even sure exactly what they do internally, so I cannot guarantee this would even work. My hunch is that it would, but that’s about as much as I can say. If you go this route, I recommend backing up /uploads/ and at least the posts and postmeta DB tables before turning the plugin loose on your site.

    Despite the warnings, backups, and my lack of experience with these regenerate images plugins, I like this approach more than adding back in an unneeded image size.

    Thread Starter htweedley

    (@htweedley)

    Thanks again bcworkz. I actually did try the image size regen plugin idea, but it did not work. Your suggestion about the add_image_size() gave me something to go on and got me exploring. I have found the following information:

    In wordpress settings>media>

    thumbnail = 150×150
    medium = 300×225
    large = 1024×1024

    My theme has a custom size called “Post Image” = 900 x 9999. This is not shown in Gutenburg image sizes drop down.

    For an example image, in Gutenburg, the Image Sizes drop down does the following:

    thumbnail = 150×150
    medium = 300×225
    large = 1024 x 768
    full size = 4608 x 3456

    If I flip over to classic editor, the image sizes options give this:

    thumbnail = 150×150
    medium = 300×225
    large = 629×472 (this is the “Post-Image” SIZE!)
    full size = 4608×3456
    custom size = 1024 x 768 (this should be the large size!)

    If I take an image where the Image Size drop down has RECENTLY re-disappeared (since I last went through and did my “classic editor>large>gutenburg>resolve>make block” workaround in Gutenburg), I can verify it has dimensions 1024×768 in the remaining dimensions boxes, and the SRC points to 1024×768. I then flip to classic editor and it shows as Custom Size 1024×768 (and the Large size option gives 629×472).

    If I take an OK image, and add code to my function.php to show the “post-image” in Gutenburg drop-down, I can confirm the Post-Image size in Gutenburg is for 629×472.

    Checking the uploads folder I have files auto generated by wordpress for the following:

    88×88 (theme custom thumb size)
    150×150 (default thumb)
    300×225 (medium)
    900×675 (Post-Image)
    768×576
    1024×768 (large)
    1280×960 (theme cover image)
    Original

    I don’t know where the 768×576 came from – maybe the twentynineteen theme.

    I don’t really understand PHP or how wordpress works in general, but I feel like maybe there is an issue somewhere where wordpress is internally conflating the theme custom size and the large size, and this is breaking the drop down in Gutenburg?

    Maybe this is in fact an issue with Lovecraft theme compatibility with Gutenburg. Reverting to TwentyNineteen theme did not fix the problem but perhaps it would not suffer the problem?… I will try to contact that theme developer unless you have any other suggestions?

    Regards,

    Hayden

    • This reply was modified 5 years, 3 months ago by htweedley.
    • This reply was modified 5 years, 3 months ago by htweedley.
    Moderator bcworkz

    (@bcworkz)

    Without being able to replicate the issue, there’s little I can do but speculate. What is particularly strange is the persistence of the problem through no plugins and switching to twentynineteen. The defined custom image sizes are determined on the fly, there is not DB entry for them. So I don’t think it’s the sizes themselves. It also possible to add sizes and not have them appear in the UI. A separate action is used to display added sizes.

    Any size data that persists in the DB is the image meta data alone. I would think the regenerate thumbnails plugin updates this data, but perhaps whatever is corrupted about the data persisted despite being altered by the plugin. I do believe the issue is related to corrupted size data somewhere, but I don’t have any idea about what specifically is corrupted or how to fix it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Image Block Settings does nto show Image Size option’ is closed to new replies.