Forum Replies Created

Viewing 15 replies - 61 through 75 (of 225 total)
  • Plugin Author interfacelab

    (@interfacelab)

    Fixed in 2.1.9.

    Plugin Author interfacelab

    (@interfacelab)

    There are definite issues with the WP crop tool, working to fix that now if I can.

    Definitely would be interested if the issues are with the crop tool that comes with Media Cloud though.

    Thanks!

    Plugin Author interfacelab

    (@interfacelab)

    Fixed in 2.1.9

    Plugin Author interfacelab

    (@interfacelab)

    Fixed in 2.1.9

    Plugin Author interfacelab

    (@interfacelab)

    The php.ini file will be wherever your php is installed to.

    I’ve done a lot of testing with Rekognition today and there are a few things of note. You’ll need to make sure your IAM user policy is correct. This is the minimum policy you’ll need to use:

    
    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "VisualEditor0",
                "Effect": "Allow",
                "Action": [
                    "s3:DeleteObjectTagging",
                    "s3:ListBucketMultipartUploads",
                    "s3:DeleteObjectVersion",
                    "s3:ListBucket",
                    "s3:DeleteObjectVersionTagging",
                    "s3:GetBucketAcl",
                    "s3:ListMultipartUploadParts",
                    "s3:PutObject",
                    "s3:GetObjectAcl",
                    "s3:GetObject",
                    "s3:AbortMultipartUpload",
                    "s3:DeleteObject",
                    "s3:GetBucketLocation",
                    "s3:PutObjectAcl"
                ],
                "Resource": [
                    "arn:aws:s3:::YOURBUCKET",
                    "arn:aws:s3:::YOURBUCKET/*",
                ]
            },
            {
                "Sid": "VisualEditor1",
                "Effect": "Allow",
                "Action": [
                    "rekognition:DetectLabels",
                    "rekognition:GetCelebrityRecognition",
                    "rekognition:GetContentModeration",
                    "rekognition:DetectFaces",
                    "rekognition:DetectModerationLabels",
                    "rekognition:RecognizeCelebrities",
                    "rekognition:CompareFaces",
                    "rekognition:DetectText",
                    "rekognition:GetCelebrityInfo",
                    "s3:HeadBucket",
                    "rekognition:GetLabelDetection"
                ],
                "Resource": "*"
            }
        ]
    }
    

    Replace YOURBUCKET with the name of your bucket.

    You’ll also need to make sure that your bucket is in one of the following AWS regions:

    us-east-1 => US East (Northern Virginia)
    us-east-2 => US East (Ohio)
    us-west-2 => US West (Oregon)
    eu-west-1 => EU (Ireland)
    ap-south-1 => Asia Pacific (Mumbai)
    ap-northeast-2 => Asia Pacific (Seoul)
    ap-southeast-2 => Asia Pacific (Sydney)
    ap-northeast-1 => Asia Pacific (Tokyo)
    us-gov-west-1 => AWS GovCloud (US)

    If it’s not in one of those buckets, it will not work. Make sure the region in Rekognition settings of the plugin are set to the same region as your bucket.

    The face data is stored in the meta data for an attachment:

    
    $meta = wp_get_attachment_metadata($attachement_id);
    // The face data will be in $meta['faces'] if any faces were detected
    

    Here is a var_dump() of what the attachment metadata looks like:

    
    Array
    (
        [width] => 673
        [height] => 1024
        [file] => nice/2018/11/03/10/07/20/0036_40790438_244300536164142_764647553286275072_n.jpg
        [sizes] => Array
            (
                [thumbnail] => Array
                    (
                        [file] => 0036_40790438_244300536164142_764647553286275072_n-150x150.jpg
                        [width] => 150
                        [height] => 150
                        [mime-type] => image/jpeg
                        [s3] => Array
                            (
                                [url] => https://gutenberg-rekognition-test.s3-accelerate.amazonaws.com/2018/11/0036_40790438_244300536164142_764647553286275072_n-150x150.jpg
                                [bucket] => gutenberg-rekognition-test
                                [privacy] => public-read
                                [key] => 2018/11/0036_40790438_244300536164142_764647553286275072_n-150x150.jpg
                                [provider] => s3
                                [options] => Array
                                    (
                                    )
    
                                [mime-type] => image/jpeg
                            )
    
                    )
    
                [medium] => Array
                    (
                        [file] => 0036_40790438_244300536164142_764647553286275072_n-197x300.jpg
                        [width] => 197
                        [height] => 300
                        [mime-type] => image/jpeg
                        [s3] => Array
                            (
                                [url] => https://gutenberg-rekognition-test.s3-accelerate.amazonaws.com/2018/11/0036_40790438_244300536164142_764647553286275072_n-197x300.jpg
                                [bucket] => gutenberg-rekognition-test
                                [privacy] => public-read
                                [key] => 2018/11/0036_40790438_244300536164142_764647553286275072_n-197x300.jpg
                                [provider] => s3
                                [options] => Array
                                    (
                                    )
    
                                [mime-type] => image/jpeg
                            )
    
                    )
    
                [large] => Array
                    (
                        [file] => 0036_40790438_244300536164142_764647553286275072_n-673x1024.jpg
                        [width] => 673
                        [height] => 1024
                        [mime-type] => image/jpeg
                        [s3] => Array
                            (
                                [url] => https://gutenberg-rekognition-test.s3-accelerate.amazonaws.com/2018/11/0036_40790438_244300536164142_764647553286275072_n-673x1024.jpg
                                [bucket] => gutenberg-rekognition-test
                                [privacy] => public-read
                                [key] => 2018/11/0036_40790438_244300536164142_764647553286275072_n-673x1024.jpg
                                [provider] => s3
                                [options] => Array
                                    (
                                    )
    
                                [mime-type] => image/jpeg
                            )
    
                    )
    
                [hero-image] => Array
                    (
                        [file] => 0036_40790438_244300536164142_764647553286275072_n-673x683.jpg
                        [width] => 673
                        [height] => 683
                        [mime-type] => image/jpeg
                        [s3] => Array
                            (
                                [url] => https://gutenberg-rekognition-test.s3-accelerate.amazonaws.com/2018/11/0036_40790438_244300536164142_764647553286275072_n-673x683.jpg
                                [bucket] => gutenberg-rekognition-test
                                [privacy] => public-read
                                [key] => 2018/11/0036_40790438_244300536164142_764647553286275072_n-673x683.jpg
                                [provider] => s3
                                [options] => Array
                                    (
                                    )
    
                                [mime-type] => image/jpeg
                            )
    
                    )
    
                [hero-simple] => Array
                    (
                        [file] => 0036_40790438_244300536164142_764647553286275072_n-673x550.jpg
                        [width] => 673
                        [height] => 550
                        [mime-type] => image/jpeg
                        [s3] => Array
                            (
                                [url] => https://gutenberg-rekognition-test.s3-accelerate.amazonaws.com/2018/11/0036_40790438_244300536164142_764647553286275072_n-673x550.jpg
                                [bucket] => gutenberg-rekognition-test
                                [privacy] => public-read
                                [key] => 2018/11/0036_40790438_244300536164142_764647553286275072_n-673x550.jpg
                                [provider] => s3
                                [options] => Array
                                    (
                                    )
    
                                [mime-type] => image/jpeg
                            )
    
                    )
    
                [small-square] => Array
                    (
                        [file] => 0036_40790438_244300536164142_764647553286275072_n-640x640.jpg
                        [width] => 640
                        [height] => 640
                        [mime-type] => image/jpeg
                        [s3] => Array
                            (
                                [url] => https://gutenberg-rekognition-test.s3-accelerate.amazonaws.com/2018/11/0036_40790438_244300536164142_764647553286275072_n-640x640.jpg
                                [bucket] => gutenberg-rekognition-test
                                [privacy] => public-read
                                [key] => 2018/11/0036_40790438_244300536164142_764647553286275072_n-640x640.jpg
                                [provider] => s3
                                [options] => Array
                                    (
                                    )
    
                                [mime-type] => image/jpeg
                            )
    
                    )
    
            )
    
        [image_meta] => Array
            (
                [aperture] => 0
                [credit] => 
                [camera] => 
                [caption] => 
                [created_timestamp] => 0
                [copyright] => 
                [focal_length] => 0
                [iso] => 0
                [shutter_speed] => 0
                [title] => 
                [orientation] => 0
                [keywords] => Array
                    (
                    )
    
            )
    
        [s3] => Array
            (
                [url] => https://gutenberg-rekognition-test.s3-accelerate.amazonaws.com/2018/11/0036_40790438_244300536164142_764647553286275072_n.jpg
                [bucket] => gutenberg-rekognition-test
                [privacy] => public-read
                [key] => 2018/11/0036_40790438_244300536164142_764647553286275072_n.jpg
                [provider] => s3
                [options] => Array
                    (
                    )
    
                [mime-type] => image/jpeg
            )
    
        [faces] => Array
            (
                [0] => Array
                    (
                        [BoundingBox] => Array
                            (
                                [Width] => 0.16790489852428
                                [Height] => 0.1103515625
                                [Left] => 0.21248142421246
                                [Top] => 0.05078125
                            )
    
                        [AgeRange] => Array
                            (
                                [Low] => 26
                                [High] => 43
                            )
    
                        [Smile] => Array
                            (
                                [Value] => 
                                [Confidence] => 90.128707885742
                            )
    
                        [Eyeglasses] => Array
                            (
                                [Value] => 
                                [Confidence] => 99.782775878906
                            )
    
                        [Sunglasses] => Array
                            (
                                [Value] => 
                                [Confidence] => 99.588790893555
                            )
    
                        [Gender] => Array
                            (
                                [Value] => Female
                                [Confidence] => 99.999702453613
                            )
    
                        [Beard] => Array
                            (
                                [Value] => 
                                [Confidence] => 99.934944152832
                            )
    
                        [Mustache] => Array
                            (
                                [Value] => 
                                [Confidence] => 99.997329711914
                            )
    
                        [EyesOpen] => Array
                            (
                                [Value] => 1
                                [Confidence] => 99.99715423584
                            )
    
                        [MouthOpen] => Array
                            (
                                [Value] => 
                                [Confidence] => 91.838279724121
                            )
    
                        [Emotions] => Array
                            (
                                [0] => Array
                                    (
                                        [Type] => CALM
                                        [Confidence] => 76.60627746582
                                    )
    
                                [1] => Array
                                    (
                                        [Type] => HAPPY
                                        [Confidence] => 26.10064125061
                                    )
    
                                [2] => Array
                                    (
                                        [Type] => SAD
                                        [Confidence] => 2.0383536815643
                                    )
    
                            )
    
                        [Landmarks] => Array
                            (
                                [0] => Array
                                    (
                                        [Type] => eyeLeft
                                        [X] => 0.26921534538269
                                        [Y] => 0.096239008009434
                                    )
    
                                [1] => Array
                                    (
                                        [Type] => eyeRight
                                        [X] => 0.32335963845253
                                        [Y] => 0.09582045674324
                                    )
    
                                [2] => Array
                                    (
                                        [Type] => nose
                                        [X] => 0.29901498556137
                                        [Y] => 0.11317467689514
                                    )
    
                                [3] => Array
                                    (
                                        [Type] => mouthLeft
                                        [X] => 0.28169691562653
                                        [Y] => 0.13609923422337
                                    )
    
                                [4] => Array
                                    (
                                        [Type] => mouthRight
                                        [X] => 0.31714773178101
                                        [Y] => 0.13541348278522
                                    )
    
                                [5] => Array
                                    (
                                        [Type] => leftPupil
                                        [X] => 0.27210903167725
                                        [Y] => 0.096320874989033
                                    )
    
                                [6] => Array
                                    (
                                        [Type] => rightPupil
                                        [X] => 0.32509756088257
                                        [Y] => 0.094451501965523
                                    )
    
                                [7] => Array
                                    (
                                        [Type] => leftEyeBrowLeft
                                        [X] => 0.24802127480507
                                        [Y] => 0.083377748727798
                                    )
    
                                [8] => Array
                                    (
                                        [Type] => leftEyeBrowUp
                                        [X] => 0.26342269778252
                                        [Y] => 0.080130204558372
                                    )
    
                                [9] => Array
                                    (
                                        [Type] => leftEyeBrowRight
                                        [X] => 0.28089293837547
                                        [Y] => 0.083327442407608
                                    )
    
                                [10] => Array
                                    (
                                        [Type] => rightEyeBrowLeft
                                        [X] => 0.31048738956451
                                        [Y] => 0.083573184907436
                                    )
    
                                [11] => Array
                                    (
                                        [Type] => rightEyeBrowUp
                                        [X] => 0.32498818635941
                                        [Y] => 0.080256082117558
                                    )
    
                                [12] => Array
                                    (
                                        [Type] => rightEyeBrowRight
                                        [X] => 0.33906579017639
                                        [Y] => 0.082221016287804
                                    )
    
                                [13] => Array
                                    (
                                        [Type] => leftEyeLeft
                                        [X] => 0.25796765089035
                                        [Y] => 0.096822209656239
                                    )
    
                                [14] => Array
                                    (
                                        [Type] => leftEyeRight
                                        [X] => 0.27993333339691
                                        [Y] => 0.096864156424999
                                    )
    
                                [15] => Array
                                    (
                                        [Type] => leftEyeUp
                                        [X] => 0.26931995153427
                                        [Y] => 0.093370839953423
                                    )
    
                                [16] => Array
                                    (
                                        [Type] => leftEyeDown
                                        [X] => 0.26937553286552
                                        [Y] => 0.098502993583679
                                    )
    
                                [17] => Array
                                    (
                                        [Type] => rightEyeLeft
                                        [X] => 0.3126737177372
                                        [Y] => 0.097046725451946
                                    )
    
                                [18] => Array
                                    (
                                        [Type] => rightEyeRight
                                        [X] => 0.33314269781113
                                        [Y] => 0.095704965293407
                                    )
    
                                [19] => Array
                                    (
                                        [Type] => rightEyeUp
                                        [X] => 0.32304656505585
                                        [Y] => 0.092858165502548
                                    )
    
                                [20] => Array
                                    (
                                        [Type] => rightEyeDown
                                        [X] => 0.32412412762642
                                        [Y] => 0.098227366805077
                                    )
    
                                [21] => Array
                                    (
                                        [Type] => noseLeft
                                        [X] => 0.28966122865677
                                        [Y] => 0.1231747046113
                                    )
    
                                [22] => Array
                                    (
                                        [Type] => noseRight
                                        [X] => 0.30705398321152
                                        [Y] => 0.12315227091312
                                    )
    
                                [23] => Array
                                    (
                                        [Type] => mouthUp
                                        [X] => 0.30040156841278
                                        [Y] => 0.13008078932762
                                    )
    
                                [24] => Array
                                    (
                                        [Type] => mouthDown
                                        [X] => 0.30214485526085
                                        [Y] => 0.14393526315689
                                    )
    
                            )
    
                        [Pose] => Array
                            (
                                [Roll] => -1.0160439014435
                                [Yaw] => -1.1779615879059
                                [Pitch] => 2.771534204483
                            )
    
                        [Quality] => Array
                            (
                                [Brightness] => 79.942672729492
                                [Sharpness] => 86.932060241699
                            )
    
                        [Confidence] => 99.996658325195
                    )
    
                [1] => Array
                    (
                        [BoundingBox] => Array
                            (
                                [Width] => 0.15898959338665
                                [Height] => 0.103515625
                                [Left] => 0.55423474311829
                                [Top] => 0.0498046875
                            )
    
                        [AgeRange] => Array
                            (
                                [Low] => 20
                                [High] => 38
                            )
    
                        [Smile] => Array
                            (
                                [Value] => 
                                [Confidence] => 53.32612991333
                            )
    
                        [Eyeglasses] => Array
                            (
                                [Value] => 
                                [Confidence] => 99.877861022949
                            )
    
                        [Sunglasses] => Array
                            (
                                [Value] => 
                                [Confidence] => 99.712669372559
                            )
    
                        [Gender] => Array
                            (
                                [Value] => Female
                                [Confidence] => 99.998840332031
                            )
    
                        [Beard] => Array
                            (
                                [Value] => 
                                [Confidence] => 98.909339904785
                            )
    
                        [Mustache] => Array
                            (
                                [Value] => 
                                [Confidence] => 99.75537109375
                            )
    
                        [EyesOpen] => Array
                            (
                                [Value] => 1
                                [Confidence] => 99.999824523926
                            )
    
                        [MouthOpen] => Array
                            (
                                [Value] => 
                                [Confidence] => 90.889503479004
                            )
    
                        [Emotions] => Array
                            (
                                [0] => Array
                                    (
                                        [Type] => HAPPY
                                        [Confidence] => 76.651100158691
                                    )
    
                                [1] => Array
                                    (
                                        [Type] => CALM
                                        [Confidence] => 50.205429077148
                                    )
    
                                [2] => Array
                                    (
                                        [Type] => CONFUSED
                                        [Confidence] => 1.0253548622131
                                    )
    
                            )
    
                        [Landmarks] => Array
                            (
                                [0] => Array
                                    (
                                        [Type] => eyeLeft
                                        [X] => 0.60221344232559
                                        [Y] => 0.096578359603882
                                    )
    
                                [1] => Array
                                    (
                                        [Type] => eyeRight
                                        [X] => 0.65561658143997
                                        [Y] => 0.088760875165462
                                    )
    
                                [2] => Array
                                    (
                                        [Type] => nose
                                        [X] => 0.62256306409836
                                        [Y] => 0.10845056176186
                                    )
    
                                [3] => Array
                                    (
                                        [Type] => mouthLeft
                                        [X] => 0.6178594827652
                                        [Y] => 0.13119769096375
                                    )
    
                                [4] => Array
                                    (
                                        [Type] => mouthRight
                                        [X] => 0.655277967453
                                        [Y] => 0.12581962347031
                                    )
    
                                [5] => Array
                                    (
                                        [Type] => leftPupil
                                        [X] => 0.60646694898605
                                        [Y] => 0.096310116350651
                                    )
    
                                [6] => Array
                                    (
                                        [Type] => rightPupil
                                        [X] => 0.65795290470123
                                        [Y] => 0.087247543036938
                                    )
    
                                [7] => Array
                                    (
                                        [Type] => leftEyeBrowLeft
                                        [X] => 0.58321338891983
                                        [Y] => 0.085290424525738
                                    )
    
                                [8] => Array
                                    (
                                        [Type] => leftEyeBrowUp
                                        [X] => 0.59432953596115
                                        [Y] => 0.081016600131989
                                    )
    
                                [9] => Array
                                    (
                                        [Type] => leftEyeBrowRight
                                        [X] => 0.60753005743027
                                        [Y] => 0.081010758876801
                                    )
    
                                [10] => Array
                                    (
                                        [Type] => rightEyeBrowLeft
                                        [X] => 0.63595622777939
                                        [Y] => 0.076753318309784
                                    )
    
                                [11] => Array
                                    (
                                        [Type] => rightEyeBrowUp
                                        [X] => 0.65531748533249
                                        [Y] => 0.071316830813885
                                    )
    
                                [12] => Array
                                    (
                                        [Type] => rightEyeBrowRight
                                        [X] => 0.67402452230453
                                        [Y] => 0.074557721614838
                                    )
    
                                [13] => Array
                                    (
                                        [Type] => leftEyeLeft
                                        [X] => 0.59276306629181
                                        [Y] => 0.098151139914989
                                    )
    
                                [14] => Array
                                    (
                                        [Type] => leftEyeRight
                                        [X] => 0.6119299530983
                                        [Y] => 0.096098512411118
                                    )
    
                                [15] => Array
                                    (
                                        [Type] => leftEyeUp
                                        [X] => 0.60134774446487
                                        [Y] => 0.093652173876762
                                    )
    
                                [16] => Array
                                    (
                                        [Type] => leftEyeDown
                                        [X] => 0.60294610261917
                                        [Y] => 0.098958089947701
                                    )
    
                                [17] => Array
                                    (
                                        [Type] => rightEyeLeft
                                        [X] => 0.64423322677612
                                        [Y] => 0.091043494641781
                                    )
    
                                [18] => Array
                                    (
                                        [Type] => rightEyeRight
                                        [X] => 0.66729933023453
                                        [Y] => 0.087408229708672
                                    )
    
                                [19] => Array
                                    (
                                        [Type] => rightEyeUp
                                        [X] => 0.65432786941528
                                        [Y] => 0.085857026278973
                                    )
    
                                [20] => Array
                                    (
                                        [Type] => rightEyeDown
                                        [X] => 0.65675550699234
                                        [Y] => 0.091199740767479
                                    )
    
                                [21] => Array
                                    (
                                        [Type] => noseLeft
                                        [X] => 0.62085485458374
                                        [Y] => 0.11755715310574
                                    )
    
                                [22] => Array
                                    (
                                        [Type] => noseRight
                                        [X] => 0.63898819684982
                                        [Y] => 0.11552639305592
                                    )
    
                                [23] => Array
                                    (
                                        [Type] => mouthUp
                                        [X] => 0.63159310817719
                                        [Y] => 0.12267334759235
                                    )
    
                                [24] => Array
                                    (
                                        [Type] => mouthDown
                                        [X] => 0.63674688339233
                                        [Y] => 0.13607706129551
                                    )
    
                            )
    
                        [Pose] => Array
                            (
                                [Roll] => -12.605429649353
                                [Yaw] => -15.24743938446
                                [Pitch] => 5.538863658905
                            )
    
                        [Quality] => Array
                            (
                                [Brightness] => 91.371520996094
                                [Sharpness] => 83.234924316406
                            )
    
                        [Confidence] => 99.971328735352
                    )
    
            )
    
    )
    

    I’m pretty confident your issues are either region or permissions related.

    Plugin Author interfacelab

    (@interfacelab)

    I actually tested a lot of these plugins today and found out that all of them try to do the image processing in the background AFTER the upload is a done deal. Obviously this doesn’t work with Media Cloud and I don’t see how it could unless they insert themselves into the upload flow. But it might be they can’t do that because the image optimizations take so long.

    So the non-optimal solution these plugins, or plugins like them, will have to use is downloading from S3, optimizing and uploading back to S3. Which means every upload will be a 2 uploads to S3 + 1 download from S3.

    In 2.1.8 I add error and warning notices to the WordPress admin that you are using incompatible plugins with a description as to why. All of the image optimization plugins I tested were added to that.

    Plugin Author interfacelab

    (@interfacelab)

    Considering PHP 5.6 is not going to be supported by PHP.org in another month, you may want to consider upgrading to PHP 7.x.

    Plugin Author interfacelab

    (@interfacelab)

    Remove the principal element all together, that’s for creating a different kind of policy for a different kind of user. From the AWS docs:

    Do not use the Principal element in policies that you attach to IAM users and groups. Similarly, you do not specify a principal in the permission policy for an IAM role. In those cases, the principal is implicitly the user that the policy is attached to (for IAM users) or the user who assumes the role (for role access policies). When the policy is attached to an IAM group, the principal is the IAM user in that group who is making the request.

    I literally just tested this with the policy I provide:

    – Go to IAM section of AWS (https://console.aws.amazon.com/iam/home?region=us-east-1#/home)
    – Click on Policy
    – Click on Create Policy
    – Click on JSON tab
    – Paste my policy template in
    – Change YOURBUCKET text to the name of the bucket
    – Click Review Policy
    – Give it a name
    – Click on Create Policy

    For adding an IAM user:

    – Go to IAM section of AWS (https://console.aws.amazon.com/iam/home?region=us-east-1#/home)
    – Click on Users
    – Click on Add user
    – Set the User name
    – Set the AWS Access type to *Programmatic access* ONLY
    – Click Next: Permissions
    – Select “Attach existing policies directly”
    – Click on Create Policy
    – In the popup window do the steps from the list above
    – Once the policy is created, as per the steps above, click on the refresh button
    – Find the policy I just created and click it’s checkbox
    – Click Next: Review
    – Click Create user

    Plugin Author interfacelab

    (@interfacelab)

    I mean imagine having to regenerate thumbnails for 70,000 images.

    Plugin Author interfacelab

    (@interfacelab)

    Or just pay the $10 (Imgix’s monthly minimum charge), put Cloudfront in front of Imgix and call it a day ??

    The $3/1000 is being charged $3 per 1000 *master* images that Imgix pulls from your S3 within a month. If you pull 4000 images in a month, it’s $12.

    This plugin was originally built for a site that has about 70,000 images on it (https://milk.xyz/) and our monthly bill is rarely above $15.

    Plugin Author interfacelab

    (@interfacelab)

    And if these plugins hook into wp_handle_upload filter and alter the $upload argument, Media Cloud will use that value. For example, if the plugin did something like this:

    
    add_filter('wp_handle_upload', function ($upload, $context = 'upload') {
                    $upload['file'] = '/some/other/thing.jpg'; 
                    return $upload;
                }, 9000);
    

    Then Media Cloud will use '/some/other/thing.jpg' for processing.

    Plugin Author interfacelab

    (@interfacelab)

    Media Cloud doesn’t change anything in the database other than adding an ‘s3’ entry to an attachment’s meta. It calculates the URL every time based on the info in the ‘s3’ meta field.

    Turning off the plugin will restore URLs. Whether or not those URLs will work depends on if the media is still on your WordPress server. However, if you are using Imgix and have uploaded stuff since you’ve started using Imgix, you can’t go back without having to replace that uploaded media because when Imgix is enabled the WordPress thumbnails are not uploaded to S3.

    The plugin definitely doesn’t change any wp_options. The upload path is calculated every time a file is uploaded. Prior to 2.1.6 the upload path was calculated any time upload_info() was called, but in 2.1.6 it’s been changed so that the path is only calculated during the upload process. You can have entirely dynamic upload paths with Media Cloud so there’s no choice for it to be anything but dynamic.

    I don’t know what effect setting upload_path or upload_url_path in wp_options will have. If you grep update_option in the code base you’ll see it’s only used to set ilab* options. I honestly don’t even know what upload_path and upload_url_path do. The sites I took a look at today all have empty values for these options and autoload set to true.

    You can get access to the storage interface via:

    
    $manager = \ILAB\MediaCloud\Tools\ToolsManager::instance();
    if ($manager->toolEnabled('storage')) {
        /** @var \ILAB\MediaCloud\Cloud\Storage\StorageInterface */
        $client = \ILAB\MediaCloud\Cloud\Storage\StorageManager::storageInstance();
        .. do your thing ..
    }
    
    Plugin Author interfacelab

    (@interfacelab)

    @mvaneijgen

    Are you seeing no output from the command at all? Please copy/paste any output you are seeing.

    Thanks,

    Jon.

    Plugin Author interfacelab

    (@interfacelab)

    Use here, I took discourse down because nobody was using it ??

    Plugin Author interfacelab

    (@interfacelab)

    Try importing from the command line.

    – SSH into your server
    – Make sure WP CLI is installed
    cd to the root of your wordpress directory
    – type wp mediacloud import

    You can also type wp mediacloud import --debug=mediacloud for debugging output.

    This should be fixed in 2.1.6 though but the web import is a hack designed for small batches.

Viewing 15 replies - 61 through 75 (of 225 total)