• Hi, thank you for the great plugin. I have a concern though. I noticed that new images are not added automatically. Is this expected? Should I click and offload each image (or bulk) or is it possible to configure the plugin the way it offloads every image I add to the wordpress library or every image a user adds through uploading from other plugins that I use? Any chance for future R2 integration?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter rocketraf

    (@rocketraf)

    I’ll reply myself. The “Disable async processing” option did that job. Turned it on and images are now uploaded when added to the library.

    By the way I’ve got some other issue. It seems that images which are in my pages linked this way:

    <a class="arishow" ><img class="aligncenter wp-image-20168 size-medium" src="https://www.xxx.com/wp-content/uploads/2022/09/xxx-300x209.png" width="300" height="208" /></a>

    doesn’t load from the imagedeliver.net domain but locally. I mean the image in the <a href> tag which opens in a gallery view (arishow).

    How can I make them open from cdn?

    Plugin Author Anton Vanyukov

    (@vanyukov)

    @rocketraf,

    Currently, only the actual images are supported for offload. Links will not get replaced. I can add a filter to adjust the regex that searches for images, however, I would not recommend this approach, because links will require an additional query (at least one) to the database to map the link to the actual attachment ID. This often negates any performance benefits you might get from serving the image via CDN.

    Best regards,
    Anton

    Anton are you able to comment on whether or not this is the method that WP Media Offload uses? Thank you

    Plugin Author Anton Vanyukov

    (@vanyukov)

    @justinfreid,

    Offloading to S3 is different, because the paths in the links stay the same… For example, let’s say we use WP Media Offload, then the image https://www.xxx.com/wp-content/uploads/2022/09/xxx.png becomes something like https://s3.amazonaws.com/my-images-bucket/2022/09/xxx.png

    This makes it easy to just look for all images on the page and replace https://www.xxx.com/wp-content/uploads/ with https://s3.amazonaws.com/my-images-bucket/ and problem solved.

    With Cloudflare Images the URL is different, it requires an image hash + the width (at the very minimum). https://imagedelivery.net/image-hash/2022/09/xxx.png/w=500 So it’s not possible to just replace the images, the plugin needs to find that image in the media library, get the image hash, get the required width and then create a URL.

    And it’s not worth to replace the links inside the <a> tags, because those do not get downloaded during the page load, hence there’s no benefit for performance.

    Best regards,
    Anton

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