• Hello Lucy,

    Your plugin is really awesome.

    There is just one or two tricks to change (IMHO) to become perfect.

    1rst I have corrected it myself adding the path to image. Mine are not at root of uploads. They are in uploads/year/month.

    2nd is that once it found a image it adds it to the media library. But because the image is already in the library it’s doubling the number of images. I’ll try to correct it. If you have one minute maybe you can help me with this part.

    Thank you once again.

    https://wordpress.org/plugins/set-all-first-images-as-featured/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello! I have the same problem, my images are not stored in the folder uploads as they are organized by date, could you explain me how to fix it I’m going crazy! Thank you!

    Thread Starter Cyrille Sanson

    (@css31)

    Hello Pabloigrana,

    In set-all-first-images-as-featured/includes/class-core.php

    after line 248:
    $tmp = explode('/', $src);

    I added this:
    $path = "/". $tmp[count($tmp) - 3] . "/" . $tmp[count($tmp) - 2] . "/";

    then in line 267:
    $file = $upload_dir['basedir'] . '/' . $filename;

    I replace ‘/’ by $path

    $file = $upload_dir['basedir'] . $path . $filename;

    It worked for me.

    But at the moment I don’t know how to correct the issue described in my previous post.

    Best,

    Hi css31, thanks for answering!

    I added the first line and the second modified but continues to generate the url of the images featured directory uploads /
    Why is it that it works for you and not me? Anyway I contacted Lucy and told me he was going to look at this problem.

    Thread Starter Cyrille Sanson

    (@css31)

    Hi Pabloigrana,

    Sorry to ear that it’s not working for you.

    My images are in wp-content/uploads/year/month and with the change I made it was OK.

    I just discovered that I had an issue with my case. I actually have done a migration from DotClear to WordPress. Using several extension I manage to get all images and put them in the library. Then I get all post and change link to images in order to correspond to WordPress architecture. It seems to be OK (post and library are displaying images) but there is no link between post and image in the library. That’s why I was looking for a plugin to set featured image.

    Actually if the link between image and post was OK I won’t need “Set All First Images As Featured”. There is another plugin “easy Add Thumbnail” that will do the trick.

    I hope Lucy will help to solve your problem. May be she could also help me. I just need to link image with post in media library.

    Hi css31!

    Sorry for my English, if something does not understand the fault of google translator xD
    I also did a migration and pictures are displayed correctly in the post, they are not in the library. You know a plugin to add images to the library so I can give up using “” Set As Featured All Images First “?

    Thread Starter Cyrille Sanson

    (@css31)

    Hi Pabloigrana,

    Don’t worry with your English, mine is not very good. :-8

    I used “Media from FTP” to put images in the library.

    Finally I found a script that declare link for images used in a post.

    You can find it here. https://wordpress.org/support/topic/auto-attach-images-to-the-post-where-they-are-inserted?replies=20

    This script worked for me. It can be used as a plugin. Follow instruction given.

    There is just a trick. You have to edit manually the id of images. In the script it’s setted: BETWEEN 3000 AND 3500

    Mine was from 4523 (or so) to 5465 (or so).

    Good luck!

    Hi css31

    I could solve all the problems with the following plugin:

    https://es.wordpress.org/plugins/media-tools/

    It generates thumbnails , taken as a featured image to the first image, the load in the gallery and associates as attach to the post. You want to resolve this last ? I hope you serve , Greetings ! Pablo

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘All most perfect’ is closed to new replies.