• I like Media Sync very much and it does what I need it for. However, I don’t understand why it insists on creating a ‘rotated’ version of any image I upload that is vertically aligned. Please can you tell me why, and how I can prevent it doing that.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author erolsk8

    (@erolsk8)

    Hi @dkalcock, I’m not sure what is “rotated” image version. Could you please let me know the names of those image files or maybe show some screenshots of:
    – actual folder with those images on the server (if you have access), and/or
    – media sync plugin (with expanded folder to see which images it finds).

    By the way, this plugin does not create any [actual] images. But maybe you have that “rotated” version as a duplicate of the original image, and then it’s just an image like any other. But if there is some standard naming for those images, I might be able to prepare you a piece of code that you can add to your site (e.g. theme) that will skip/ignore those images.

    Or if you want to try it out and ignore all files containing the text “-rotated”, you can this (in functions.php file of your template for example):

    
    /**
     * Overwrite Media Sync plugin rules for skipping scanned files or folders.
     *
     * Should return bool value.
     *
     * @param boolean $is_ignored Default rules for this file/folder (skipping thumbnails, index.php, hidden files, etc.)
     * @param string $full_path Each scanned file/folder absolute path
     * @param string $file_name Each scanned file/folder name
     * @return boolean
     */
    function my_custom_media_sync_additional_file_skip($is_ignored, $full_path, $file_name)
    {
        // Ignore any file containing "-rotated"
        $is_ignored_custom = strpos($file_name, '-rotated') !== false;
        return !!($is_ignored || $is_ignored_custom);
    }
    add_filter('media_sync_filter_is_scan_object_ignored', 'my_custom_media_sync_additional_file_skip', 10, 3);

    `

    You can of course edit that $is_ignored_custom to match which files you want to ignore.

    Hope it makes sense ??

    Thread Starter dkalcock

    (@dkalcock)

    Thanks for the swift reply. Using File Manager I can view the images in my image folders. After upload only the original images are there. When I run Media Sync and import the new images into media library. then go back and look in the folder again, a new version has been created, which is labeled as rotated. This only happens with vertically orientated images. I don’t want to ignore them, I don’t want them created in the first place. It may be that it is WordPress creating this version as it is imported in to the media library, but using the plugin ‘Fix Image Rotaion’ does not stop it happenning. I’d happily attach an image to show what I see in the File Manager, but I cannot see how to do that in this forum.

    Plugin Author erolsk8

    (@erolsk8)

    Well, you can import/upload screenshot to your website and copy the direct URL, or just google how to do it ??

    It may be that it is WordPress creating this version as it is imported in to the media library

    Exactly, this plugin uses same functions that are used by Media Library, so you should first try to upload those images there and see what happens. If it’s the same, then you have a problem with WordPress itself.

    Plugin Contributor Simon Kane

    (@simonkane)

    Just my 2 cents.
    Maybe we have a ‘upload’ versus ‘import’ issue here?

    The https://www.ads-software.com/plugins/fix-image-rotation/ plugin previously mentioned hooks the actual ‘generic’ file upload — this is not a Media Library function/filter. It is applied during the “get the file contents onto the server via WP admin” activity.

    Media Sync does not ‘upload’ files. It works on files that are already on the server, and ‘imports’ them to the media library.

    WordPress itself will process a file (creating ‘rotated’, ‘resized’, etc.) during import to the media library — but the ‘fix rotation’ plugin does not run at that point.

    So, the question becomes: “Are the files being processed by Media Sync uploaded to the server via WordPress, or ‘manually’ via a file manager or some kind?”.

    If via a file manager or some other batch process, then the ‘fix rotation’ plugin is not being invoked, and the default WP rotate logic has not been circumvented by it.

    Sure would like to know if I have grokked the issue here. ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Rotate version created’ is closed to new replies.