WP Offload S3
[resolved] Unable to upload jpg and png, But pdf no problem (4 posts)

  1. niw2cp
    Posted 1 year ago #

    I am running WordPress on Hostgator with Amazon S3 and Cloudfront plugin. I can upload .pdf and .txt files and they save in the S3 bucket. But .jpg and .png are saving locally.

    The same configuration on a different host is saving to S3 bucket for all file types.
    Whether key and secret are in config.php or database, gives the same result.
    Bucket is set to US Standard.
    I am getting no errors and nothing shows in the S3 log file or local error_log.
    Plugin is 0.6.2
    PHP is 5.4.

    Any ideas? Where should I start looking?


  2. niw2cp
    Posted 1 year ago #

    This appears to be controlled by WordPress mime type.
    Since jpgs and pngs are set to the image mime type. If you change them to the application mime type, the images begin to upload to S3.

    I'll submit a code suggestion to github.

  3. ryanphung
    Posted 1 year ago #

    Hi niw2cp,

    I think I'm facing exactly the same problem with hostgator. Do you mind sharing what did you do to resolve it? Thank you.


  4. niw2cp
    Posted 1 year ago #

    I moved to another host. I worked with HG to resolve the issue, but neither of us could figure it out. I suspect there is an issue with the multiple image upload to AWS.

    Only image mime types get broken into smaller versions (thumb, medium, etc), so setting to another mime type bypassed WordPress's image resizing process. Viola, a single image file successfully uploads to S3, but with two problems.

    The image on S3 is now only at the original filesize with no smaller versions. And, the admin area will show filetype icons instead of the image thumbnail. :(

    I lost the trail at the SSL version for cURL. (See my issue at Github. https://github.com/bradt/wp-tantan-s3/issues/64) Do you have a VPS with HG? You may be able to control things like that.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Offload S3
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.