• Resolved junx0r

    (@junx0r)


    Fairly standard LAMP WordPress instance on dedicated server, using permalinks, everything is up to date. All plugin options are default, Imagick is installed. I immediately get the following error when I try to convert existing images by clicking ‘Regenerate All’:

    17:30:09 – An error occurred while connecting to REST API. Please try again.

    404 – (https://www.mysite.com/wp-json/webp-converter/v1/paths-7212671d8e)

    In the console it says:

    `scripts.js?ver=4.3.4:1 POST https://www.mysite.com/wp-json/webp-converter/v1/paths-7212671d8e 404
    (anonymous) @ scripts.js?ver=4.3.4:1
    e.exports @ scripts.js?ver=4.3.4:1
    e.exports @ scripts.js?ver=4.3.4:1
    f.request @ scripts.js?ver=4.3.4:1
    (anonymous) @ scripts.js?ver=4.3.4:1
    value @ scripts.js?ver=4.3.4:1
    value @ scripts.js?ver=4.3.4:1`

    I checked https://www.mysite.com/wp-json to be sure it’s there, and there is no problem with it

    When I upload new images, a little icon appears in the top bar saying it’s converting images, then disappears, but no files are ever created in /uploads-webpc

    .htaccess files are created correctly by the plugin, I checked everything extensively and I can’t find the reason why it’s giving me 404.

    Do you have a sense of what the problem might be? What should I check next, or what steps should I follow to troubleshoot?

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter junx0r

    (@junx0r)

    It’s not that big a deal, I don’t want to take up your time over email support. If you have any ideas on how I could troubleshoot this or what the most likely problems might be, please let me know. Thanks.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @junx0r There may be many reasons for this. Over 200,000 users use the plugin. 200,000 users, it works, they don’t have a 404 error, and you have a 404 error. I don’t know your website configuration, I don’t know what could be the reason.

    Have you tried to find the source of the problem on your own?

    Thread Starter junx0r

    (@junx0r)

    I just wanted to post the solution to help you learn more about potential issues, and to help others.

    I disabled the W3TC plugin and clicked Regenerate All, and I got a 504 error. This was some progress at least. I re-enabled W3TC, and clicked Regenerate All again, and this time…it just worked. So it looks like W3TC was screwing up the REST API path somehow. You might want to warn users or provide instructions on how to exclude it in W3TC. (Note: I also have the Cloudflare APO plugin enabled.)

    Plugin is converting about 1,000 images per minute. I have around 2 million images total. So far it has converted 40,000 images with no problem and it’s still going. Average size savings is 36%.

    Quick question: My jpg files are not really optimized in any way. Should jpg files be COMPRESSED before being converted to webp? Would that result in more savings?

    Additional information, just FYI

    Server architecture	Linux 4.18.0-383.el8.x86_64 x86_64
    Web server	Apache/2.4.37 (centos) OpenSSL/1.1.1k
    PHP version	7.4.29 (Supports 64bit values)
    PHP SAPI	fpm-fcgi
    PHP max input variables	1000
    PHP time limit	30
    PHP memory limit	2048M
    Max input time	60
    Upload max filesize	32M
    PHP post max size	32M
    cURL version	7.61.1 OpenSSL/1.1.1k
    Is SUHOSIN installed?	No
    Is the Imagick library available?	Yes
    Are pretty permalinks supported?	Yes
    .htaccess rules	Custom rules have been added to your .htaccess file.
    Active editor	WP_Image_Editor_Imagick
    ImageMagick version number	1692
    ImageMagick version string	ImageMagick 6.9.12-48 Q16 x86_64 17235 https://legacy.imagemagick.org
    Imagick version	3.7.0
    File uploads	Enabled
    Max size of post data allowed	32M
    Max size of an uploaded file	32M
    Max effective file size	32 MB
    Max number of files allowed	20
    Imagick Resource Limits	
    area: 125 GB
    disk: 9.2233720368548E+18
    file: 768
    map: 125 GB
    memory: 62 GB
    thread: 1
    ImageMagick supported file formats	3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIDEO, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
    GD version	2.3.3
    GD supported file formats	GIF, JPEG, PNG, WebP, BMP, XPM
    Ghostscript version	9.27
    • This reply was modified 2 years, 9 months ago by junx0r.
    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @junx0r I believe that there is no point in converting JPG files beforehand. However, I encourage you to try the AVIF format. You should be able to reduce the weight of images by an additional 25% compared to WebP.

    Thread Starter junx0r

    (@junx0r)

    Yes I want to look into AVIF next.

    Quick question: I have a conversion in progress but I am approaching hard drive limit. How do I stop the conversion that’s in progress? Thanks.

    Thread Starter junx0r

    (@junx0r)

    Nevermind, I just reloaded the page.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘404 error related to /wp-json/webp-converter/v1/paths-7212671d’ is closed to new replies.