BuddyDev

Search

Problem with upload images

  • Participant
    Level: Enlightened
    Posts: 120
    nana on #7754

    Hi. I have a problem. Each time I upload an image as “featured image” in a new post, this image is uploaded with 6 different sizes in:

    I have consulted with my hosting server and they tell me that the problem is community builder theme. It seems that the problem is caused by a function called resizing and thumbnail generation of the Community Builder WordPress template:

    $ Sizes = array (
    // main post thumbnail size
    ‘Thumbnail’ => array (
    ‘Width’ => 525,
    ‘Height’ => 180,
    ‘Crop’ => true, // set false for resize
    ),

    ‘Featured-mid’ => array (
    ‘Width’ => 782,
    ‘Height’ => 180,
    ‘Crop’ => true, // set false for resize
    ),

    ‘Featured-large’ => array (
    ‘Width’ => 1220, / / single col pages
    ‘Height’ => 180,
    ‘Crop’ => true, // set false for resize
    ),

    After an image is uploaded, its resized versions are saved as serialized string data in the application of the database:

    Code:
    A: 5: {s: 5: “width”; i: 1500; s: 6: “height”; i: 1200; s: 4: “file”; s: 15: “2017/03 / ; S: 5: “sizes”; a: 6: {s: 12: “medium_large”; a: 4: {s: 4: “file”; s: 15: “te2-768×614.jpg”; s: 5 : “Image / jpeg”;} s: 14: “post-thumbnail:” width “; i: 768; s: 6:” height “; i: 614; s: 9: “; A: 4: {s: 4:” file “; s: 15:” te2-525×180.jpg “; s: 5:” width “; i: 525; s: 6:” height “; ; S: 9: “mime-type”; s: 10: “image / jpeg”;} s: 12: “featured-mid” Mime-type “; s: 10:” image / jpeg “; s: 5:” width “; i: 782; s: 6: ; S: 14: “featured-large”; a: 4: {s: 4: “file”; s: 16: “te2-1220×180.jpg”; s: 5: “width”; i: 1220; s : 6: “height”; i: 180; s: 9: “mime-type”; s: 10: “image / jpeg”;}

    Please, how can I solve this?

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #7755

    Hi,
    Community Builder needs three featured image sizes for the following purpose:-
    1. Thumbnail for grid/masonry layouts
    2. featured-mid for the featured image size used with 2 column layout
    3. featured-large:- for the featured image used with the single column layout

    The problem you are seeing has nothing to do with the Community Builder, It is the way WordPress works with featured image.

    I will suggets looking at plugins which delete the original images and keep the media cleaner for more efficient usage.

  • Participant
    Level: Enlightened
    Posts: 120
    nana on #7863

    Thanks Brajesh, I want to avoid an excess of images in my hosting.
    Are you saying that all of them are necessary for community builder?
    I finally upload an image and create a total of 6 images … this is a lot!

    • This reply was modified 7 years, 8 months ago by nana.
  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #7865

    No,
    Only 3 is needed but WordPress will create all of them anyway. It is not the theme which creates/manages all. It is an issue in WordPress and has been known for long.

    You can find many plugins which deal with removing extra images.

  • Participant
    Level: Enlightened
    Posts: 120
    nana on #7876

    Oh! My hosting provider says it’s theme problem! And he gave me this code:

    A: 5: {s: 5: “width”; i: 1500; s: 6: “height”; i: 1200; s: 4: “file”; s: 15: “2017/03 / ; S: 5: “sizes”; a: 6: {s: 12: “medium_large”; a: 4: {s: 4: “file”; s: 15: “te2-768×614.jpg”; s: 5 : “Image / jpeg”;} s: 14: “post-thumbnail:” width “; i: 768; s: 6:” height “; i: 614; s: 9: “; A: 4: {s: 4:” file “; s: 15:” te2-525×180.jpg “; s: 5:” width “; i: 525; s: 6:” height “; ; S: 9: “mime-type”; s: 10: “image / jpeg”;} s: 12: “featured-mid” Mime-type “; s: 10:” image / jpeg “; s: 5:” width “; i: 782; s: 6: ; S: 14: “featured-large”; a: 4: {s: 4: “file”; s: 16: “te2-1220×180.jpg”; s: 5: “width”; i: 1220; s : 6: “height”; i: 180; s: 9: “mime-type”; s: 10: “image / jpeg”;}

    If someone recommends me plugin to fix it, thanks guys!

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #7893

    Hi,
    Most probably your hosting provider does not have a WordPress experienced person. They should have known that the theme is registering only 3 sizes and they should have also known how WordPress works with media if they were any expert.

    Please see the google results about the issue

    https://www.google.co.in/search?q=WordPress+redundant+image+problem&oq=WordPress+redundant+image+problem&sourceid=chrome&ie=UTF-8#q=WordPress+media+sizes+too+many+images&*

    Also, I do recommend using the Simple Imge Sizes plugin to control the generated images. Please see our recommendation here

    https://buddydev.com/docs/guides/community-builder/resources/useful-wordpressbuddypress-plugins/

    Hope that helps.

  • Participant
    Level: Enlightened
    Posts: 120
    nana on #7904

    Hi,

    I had already done this step:

    “Go to Settings and then, Media.
    Here you will find 3 various image sizes: thumbnail, medium, large. Decide which image sizes you will not use and then set those sizes to 0. ”

    Then I saw that they were still generating lots of images and I consulted with my hosting provider, and then he said that it was community builder issue.

    I am going to try now to use the plugin that you recommend me, and I inform you.

    Many thanks Brajesh!

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #7963

    You are welcome. Please do let me know if using the plugin worked for you or not?

    I can provide code to avoid any image generation by Community Builder but that may not be the best solution.

  • Participant
    Level: Enlightened
    Posts: 120
    nana on #7967

    Hi Brajesh. After installing “simple image sizes” the following sizes appear:

    Thumbnail size
    Medium size
    Large size

    medium_large size
    post-thumbnail size
    featured-mid size
    featured-large size

    I have all put it to “0”. Now I have written a post with featured image, and now in my “cpanel” folders only a single image file appears. That’s fine! But will this give community builder display errors?

    Thanks!!

You must be logged in to reply to this topic.

This topic is: not resolved