udx / wp-stateless

WP-Stateless is a WordPress plugin that uploads and serves your WordPress media from Google Cloud Storage.
https://stateless.udx.io
MIT License
260 stars 62 forks source link

CSS background-image not rendered on preview when using Elementor #769

Open NicolasCayet opened 22 hours ago

NicolasCayet commented 22 hours ago

Hello,

I'm using following plugins :

When I modify a page via Elementor and I set an image as style -> background for a container, I can select an image from GCS. This image is well displayed on Elementor's update mode. After i've saved the page, previewed page does not show this image. I've noticed that HTML rendered is using a corrupted image file path in the CSS. For example : background-image: url("https://storage.googleapis.com/mybucket2024/10//4b509ea7-my-image.jpg"); In this example, mybucket is my bucket name on GCS. 2024/10 is the upload folder rule applied.

Why does the trailing slash after the bucket name is removed from CSS file path ? Why slash is in doublon after the destination folder in GCS ?

I'm also pointing that <img tags are well rendered. Last point : carousel elements of elementor, using CSS background-image, are having the same CSS filepath issues.

Hope this is the right place to post this message (and not in repo ://github.com/udx/wp-stateless-elementor-website-builder-addon)

Thanks !

balexey88 commented 20 hours ago

Hello @NicolasCayet ,

Could you please copy the info from Media / Stateless Setting / Status and pot it here? Thanks!

NicolasCayet commented 20 hours ago

Hello @NicolasCayet ,

Could you please copy the info from Media / Stateless Setting / Status and pot it here? Thanks!

### Server

Server architecture: Linux 5.10.0-32-cloud-amd64 x86_64
Web server: Apache
MySQL version: 8.0.37-google
MySQL default engine: InnoDB
PHP Version: 8.1.28
PHP Memory Limit: 512M
PHP Max Input Vars: 1000
PHP Max Post Size: 128M
PHP Time Limit: 30
Max Upload Size: 128M
Allow URL-aware fopen Wrappers: Yes
Loaded Extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, Zend OPcache

### WordPress

Version: 6.6.2
Multisite: No
Memory Limit: 40M
Total Attachments: 244
Image Sizes (6): (150x150) thumbnail, (300x300) medium, (768x0) medium_large, (1920x1080) large, 1536x1536, 2048x2048
Theme: Hello Elementor 3.1.1
Active Plugins: Cloudflare 4.12.8, Cookie Notice & Compliance for GDPR / CCPA 2.4.18, Elementor 3.24.5, Elementor Forms Conditional Logic 2.2.3, Elementor Pro 3.24.3, Maspik - Advanced Spam Protection 2.2.5, UpdraftPlus - Backup/Restore 1.24.6, Wordfence Security 7.11.7, WordPress Sentry 8.2.0, WP-Optimize - Clean, Compress, Cache 3.6.0, WP-Stateless 4.1.1, WP-Stateless - Elementor Website Builder Addon 0.0.2, Yoast SEO 23.5

### WP-Stateless

Version: 4.1.1
Database Version: 1.1
Mode: Stateless
File URL Replacement: Disabled
Supported File Types: jpg jpeg png gif pdf
Bucket: Set
Bucket Accessible: No
Service Account JSON: Set
Cache-Control: Default: public, max-age=36000, must-revalidate
Delete GCS File: Enable
Folder: %date_year/date_month%
Domain: Not set
Cache-Busting: Enable
Dynamic Image Support: Disable
Use Post Meta: Disable
Total Files: 1
Total File Sizes: 0
Compatibility Files: 0
Data Optimization: 20240423174109: Skipped, 20240219175240: Finished

### Google Cloud

Storage Class: STANDARD
Public Access Prevention: Inherited
Access Control: Uniform
Versioning: Disabled
Soft Delete: Enabled