温唯
Forum Replies Created
-
Hi @alexmangini
I have the same problem, can you help me?
My page is https://cinfor.info/chtraditional/This screenshot below is frontend , Coin Icons and Percentage Change not display
https://upload.cc/i1/2022/08/21/nhMliN.pngThis screenshot below is the widget edit page
https://upload.cc/i1/2022/08/21/Mzvx62.pngThis screenshot below is the settings of Crypto in widget edit page
https://upload.cc/i1/2022/08/21/akUXEP.pngHi Poonam Namdev @poonam9
Thank you for helping me.
The following codes is what I found in .htaccess file
Sorry to replace the real domain with *mydomain* for some reasons.RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g?|png)$ [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://mydomain\.com [NC] RewriteRule \.(gif|jpe?g?|png)$ - [F,NC,L]
Can you teach me how to modify the codes?
For example: when the image url provided by Optimole’s CDN ishttps://example.i.optimole.com/example/w:280/h:187/q:100/dpr:2.0/https://mydomain.com/ wp-content/uploads/image.jpg
, then, what code should I fill in? And where should I insert them?Thanks in advanced.
HI Poonam Namdev @poonam9
Thank you for replying.
I have also turn on Prevent Hotlinks through All In One WP Security & Firewall , which will insert code to .htaccess
But it also protect images with the url from my domain , not includes the url from OptiMole CDN.For example:
Here is an image url with my domain , this url has been protected from hotlink.
https://mydomain.com/wp-content/uploads/image.jpgAnd here is an image url with OptiMole CDN , this url has not been protected from hotlink.
https://example.i.optimole.com/example/w:280/h:187/q:100/dpr:2.0/https://mydomain.com/wp-content/uploads/image.jpgWhat I want to ask is, how can I protect the images provided through the OptiMole CDN to prevent them from being hotlinked, because this will increase the number of visits to my OptiMole account.
Hi @bvytis
Thanks for checking.
I’ve sent message through Optimole Dashboard.
Please check it.
Thanks in advanced.Hi @bvytis
Thank you for checking.So I try to upload a gif to my subdomain which has been allowed in Optimole dashboard.
The gif has been served through Optimole CDN , but it is invisible.
Please check this page:
https://miriammibao.com/code-snippet/The gif url is:
https://cvrt.miriammibao.com/images/2021/04/20/e568d8343bcf3ebff6987a7179290ebe.gifAlthough I still can find it in Chrome inspect,please check this screenshot:
https://upload.cc/i1/2021/04/20/xNl3i7.pngIs it due to Lazyload or Convert Gif to Mp4 method to cause that gif not display?
Here is my settings:
General:
https://upload.cc/i1/2021/04/20/bL0tRV.pngCompression:
https://upload.cc/i1/2021/04/20/vk3RiK.pngLazyload:
https://upload.cc/i1/2021/04/20/HdAyC2.png- This reply was modified 3 years, 11 months ago by 温唯.
Hi @bvytis
I’ve added googleusercontent.com
and clean all cache , but that image still not served through Optimole CDN.Hi @bvytis
Here is the page that contains the image in Google Drive
https://miriammibao.com/css-for-headings-in-gutenberg-and-block-editor/
Images hosted in my domain and subdomains have been served through Optimole’s CDN properly.
But for images in my Google Drive, I have no idea how to deal with to serve them through Optimole.
Thank you so much.
Hi @bvytis
I have test my site here
https://optimole.com/test-drive?results=92337
Please help me to check my website, thank you.That’s awesome!!
After clearing Simple Cache and Cloudflare Cache , those background images have been served thought Optimole , and transferred to WebP.It’s really great. I have tried many solutions, such as ShortPixel Adaptive Images, JetPack, Flying Image, Cloudinary, ImageKit… all of them can’t handle background images included in OXYGEN CSS.
Unexpectedly, Optimole did it.So, please ignore the background images question.
And I still need to ask you to help me reply to the options of “Use native lazyload” and Scale Images, thank you.- This reply was modified 3 years, 12 months ago by 温唯.
Supplementary note:
For the further question,
I also have enabled “network based optimizations” and “Serve CSS & JS through Optimole” in “Compression” tab ,but that seems not to apply on those background images.Hi @sixaxis
Thank you for quick replying.
miriammibao.comAnd I just reactivated Rocket Loaded and cleared all cache for you to check it out.
“Uncaught The ShortPixel ai.min.js is” still occurred in this page
https://miriammibao.com/blog/style-inspiration-portfolios/Besides, I also found that there are several background images which are included in OXYGEN CSS can not be transferred to WebP , even I have activated “Lazy-load the backgrounds” and “Lazy-load URLs in the JS blocks” and “Lazy-load JSON URLs”.
Please check these 2 screenshots:
https://upload.cc/i1/2021/03/28/FSANZJ.png
https://upload.cc/i1/2021/03/28/KSEWtz.pngThose background images in homepage are
https://cdn.shortpixel.ai/spai/q_lossy+ret_img/https://cvrt.miriammibao.com/images/2021/01/25/IMG_8306-home-1-2000px.jpg
https://cdn.shortpixel.ai/spai/q_lossy+ret_img/https://cvrt.miriammibao.com/images/2021/01/28/IMG_8306-fb-bg.jpg
https://s3.miriammibao.com/wp-content/uploads/2020/06/14005502/CSS-for-headings-in-gutenberg-and-block-editor-390×260.jpg
https://cdn.shortpixel.ai/spai/q_lossy+ret_img/https://cvrt.miriammibao.com/images/2021/01/28/skin-care-fb-group.png
https://miriammibao.com/wp-content/uploads/2020/11/cropped-miriammibao_favicone512px-1-32×32.pngAnd a lot of images in the content part of this page also have not been transferred to WebP.
https://miriammibao.com/blog/style-inspiration-portfolios/
Those images are also background contained in OXYGEN CSS.
Forum: Plugins
In reply to: [Side Cart Woocommerce | Woocommerce Cart] Display Side Cart only on frontendHi @xootix
Here is it:
https://upload.cc/i1/2020/12/18/qeI4St.pngIt is OXYGEN builder back-end,the cart icon pointed to by the green arrow appears in the area of the front-end displaying , I think this is very reasonable.
But the cart icon pointed by red arrow is on OXYGEN builder edit panel , I don’t think it should show up there , because it does cover part of the edit panel.
Is there any way to remove it in OXYGEN back-end ?
Hi @razyrx
Will the tab slug be changed again in future?Hi,
I’ve found the “Tab ID” in page been changed from “tab-3086” to “tab-3086_tab”Here is a screenshot of “Tab ID” in 1.1.3.3:
https://upload.cc/i1/2020/11/28/fOrbN9.pngAnd here is the screenshot of “Tab ID” in 1.1.3.4:
https://upload.cc/i1/2020/11/28/2MkJf0.pngSo , I have to change every text links to the new ID type .
Because the work is huge , so I want to make sure , if the Tab ID type would be changed again in next version or further ?
Thank you.
Hi @rajeevrf
Thank you for always helping me, I found the solution finally.
I followed the code you provided above, and modified “add filter”, then it did work.The problem is not related to add codes to “Code Snippet plugin” or to “function.php” file , they are the same.
It’s weird that
array( $this,
will cause error to my site , So I changedadd_filter('as3cf_pre_upload_attachment', array( $this,'pre_upload_attachment' ), 10, 3 );
toadd_filter('as3cf_pre_upload_attachment','pre_upload_attachment', 10, 3 );
. After that, it will prevent specific files from been uploaded to s3.Here is my code added to “Code Snippet plugin” :
add_filter( 'as3cf_pre_upload_attachment', 'pre_upload_attachment', 10, 3 ); function pre_upload_attachment( $abort, $post_id, $metadata ) { // Example stops image files from being offloaded. $file = get_post_meta( $post_id, '_wp_attached_file', true ); $extension = is_string( $file ) ? pathinfo( $file, PATHINFO_EXTENSION ) : false; if ( is_string( $extension ) && in_array( $extension, array( 'png', 'jpg', 'jpeg' ) ) ) { $abort = true; // abort the upload } // Example helps bulk offload tool on severely resource restricted shared hosting. // WARNING: Do not uncomment the following code unless you're on shared hosting and getting "too many open files" errors // as <code>gc_collect_cycles()</code> could potentially impact performance of the bulk offload and WordPress. /* if ( false === $abort ) { gc_collect_cycles(); } */ return $abort; }
Hope to help others
And thank you very much, I am too stupid to know that it’s necessary to add “add filter” to those codes, so that what I did before is invalid.