Cloudinary and ACF/Twig templates
-
We’re testing to see if we can use the Cloudinary plugin for our client’s site. Installation was smooth, and any posts with images automatically updated to Cloudinary URLs, which is great.
However, a lot of our client’s site uses custom twig templates powered by Advanced Custom Fields. For those, the images have automatically switched to being served from Cloudinary, which is great, but previously in those templates, we used a Twig function to resize the images, like
{{image.src|resize(700)}}, which would generated a 700px wide copy of the image.We can’t find a way to reproduce this using Cloudinary. If we leave the
resizefunction, then the image is served from WordPress, not Cloudinary. If we remove it, the image is served from Cloudinary at the full image size.We can’t use global transforms or taxonomy transforms, because we don’t want to resize all images on the page the same way — images in certain templates need different sizes.
I suspect this just isn’t possible with the Cloudinary plugin out of the box, and we’ll need to do some manual editing of the image URL in the twig template to insert a Cloudinary resize URL param, but I thought I’d ask here first in case I was missing something.
-
This topic was modified 4 years, 10 months ago by
spaceninja.
-
This topic was modified 4 years, 10 months ago by
-
Just realized I wrote Twig, but the
resize()function actually comes from Timber.Hi @spaceninja,
Thanks for reaching out.
Do you know where the images are stored? I would suspect that Timber might save a copy on their own specific location where Cloudinary can’t sync or find the asset. We do require to have all the assets stored in the wp-upload folder.
What if you clear the cache of your whole website? Do you still see the same behavior?
Thanks in advance.
Best,
Loic{ "system_status": { "home": "https://cpesite.local", "wordpress": "5.7.2", "php": "7.3.5", "php_extensions": [ "Core", "date", "libxml", "openssl", "pcre", "zlib", "bcmath", "bz2", "calendar", "ctype", "curl", "dom", "hash", "fileinfo", "filter", "ftp", "gd", "gettext", "SPL", "iconv", "json", "mbstring", "session", "standard", "pcntl", "mysqlnd", "PDO", "pdo_mysql", "Phar", "posix", "Reflection", "mysqli", "shmop", "SimpleXML", "soap", "sockets", "exif", "tokenizer", "xml", "xmlreader", "xmlrpc", "xmlwriter", "xsl", "zip", "cgi-fcgi", "Zend OPcache", "xdebug" ] }, "theme_status": { "name": "Champion Power Equipment", "version": "0.0.1", "author": "Cloud Four", "author_url": "https://cloudfour.com/", "child_theme": false }, "plugins_report": { "must_use": [ "/Users/scott/Sites/cpesite/app/public/wp-content/mu-plugins/wpe-elasticpress-autosuggest-logger.php" ], "plugins": [ { "GitHub URI": "", "Name": "Admin Columns Pro - Advanced Custom Fields (ACF)", "PluginURI": "https://www.admincolumns.com", "Version": "2.6.4", "Description": "Supercharges Admin Columns Pro with columns for Advanced Custom Fields (ACF) <cite>By <a href=\"https://www.admincolumns.com\">AdminColumns.com</a>.</cite>", "Author": "<a href=\"https://www.admincolumns.com\">AdminColumns.com</a>", "AuthorURI": "https://www.admincolumns.com", "TextDomain": "codepress-admin-columns", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "5.6.20", "Title": "<a href=\"https://www.admincolumns.com\">Admin Columns Pro - Advanced Custom Fields (ACF)</a>", "AuthorName": "AdminColumns.com" }, { "GitHub URI": "", "Name": "Admin Columns Pro", "PluginURI": "https://www.admincolumns.com", "Version": "5.5.3", "Description": "Customize columns on the administration screens for post(types), users and other content. Filter and sort content, and edit posts directly from the posts overview. All via an intuitive, easy-to-use drag-and-drop interface. <cite>By <a href=\"https://www.admincolumns.com\">AdminColumns.com</a>.</cite>", "Author": "<a href=\"https://www.admincolumns.com\">AdminColumns.com</a>", "AuthorURI": "https://www.admincolumns.com", "TextDomain": "codepress-admin-columns", "DomainPath": "/languages/", "Network": false, "RequiresWP": "", "RequiresPHP": "5.6.20", "Title": "<a href=\"https://www.admincolumns.com\">Admin Columns Pro</a>", "AuthorName": "AdminColumns.com" }, { "GitHub URI": "", "Name": "Admin Meta Search", "PluginURI": "http://www.perfettosites.com/portfolio/admin-meta-search/", "Version": "1.0", "Description": "Extend Search Post, Page, Custom Post Type with custom meta value <cite>By <a href=\"http://www.perfettosites.com/\">Eric Wijaya</a>.</cite>", "Author": "<a href=\"http://www.perfettosites.com/\">Eric Wijaya</a>", "AuthorURI": "http://www.perfettosites.com/", "TextDomain": "admin-meta-search", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"http://www.perfettosites.com/portfolio/admin-meta-search/\">Admin Meta Search</a>", "AuthorName": "Eric Wijaya" }, { "GitHub URI": "", "Name": "Advanced Custom Fields PRO", "PluginURI": "https://www.advancedcustomfields.com", "Version": "5.9.9", "Description": "Customize WordPress with powerful, professional and intuitive fields. <cite>By <a href=\"https://www.advancedcustomfields.com\">Delicious Brains</a>.</cite>", "Author": "<a href=\"https://www.advancedcustomfields.com\">Delicious Brains</a>", "AuthorURI": "https://www.advancedcustomfields.com", "TextDomain": "acf", "DomainPath": "/lang", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"https://www.advancedcustomfields.com\">Advanced Custom Fields PRO</a>", "AuthorName": "Delicious Brains" }, { "GitHub URI": "", "Name": "Advanced Custom Fields: Table Field", "PluginURI": "http://www.johannheyne.de/", "Version": "1.3.14", "Description": "This free Add-on adds a table field type for the Advanced Custom Fields plugin. <cite>By <a href=\"http://www.johannheyne.de/\">Johann Heyne</a>.</cite>", "Author": "<a href=\"http://www.johannheyne.de/\">Johann Heyne</a>", "AuthorURI": "http://www.johannheyne.de/", "TextDomain": "acf-table", "DomainPath": "/lang/", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"http://www.johannheyne.de/\">Advanced Custom Fields: Table Field</a>", "AuthorName": "Johann Heyne" }, { "GitHub URI": "", "Name": "Advanced Post Types Order", "PluginURI": "http://www.nsp-code.com", "Version": "4.3.8.6", "Description": "Order Post Types Objects using a Drag and Drop Sortable javascript capability <cite>By <a href=\"http://www.nsp-code.com\">Nsp Code</a>.</cite>", "Author": "<a href=\"http://www.nsp-code.com\">Nsp Code</a>", "AuthorURI": "http://www.nsp-code.com", "TextDomain": "advanced-post-types-order", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"http://www.nsp-code.com\">Advanced Post Types Order</a>", "AuthorName": "Nsp Code" }, { "GitHub URI": "", "Name": "Akismet Anti-Spam", "PluginURI": "https://akismet.com/", "Version": "4.1.10", "Description": "Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. It keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key. <cite>By <a href=\"https://automattic.com/wordpress-plugins/\">Automattic</a>.</cite>", "Author": "<a href=\"https://automattic.com/wordpress-plugins/\">Automattic</a>", "AuthorURI": "https://automattic.com/wordpress-plugins/", "TextDomain": "akismet", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"https://akismet.com/\">Akismet Anti-Spam</a>", "AuthorName": "Automattic" }, { "GitHub URI": "", "Name": "WP Engine Smart Plugin Manager", "PluginURI": "", "Version": "4.7.0", "Description": "WP Engine Smart Plugin Manager simplifies plugin management by automatically updating your plugins every day and ensuring your site continues to work as expected. <cite>By <a href=\"https://wpengine.com\">WP Engine</a>.</cite>", "Author": "<a href=\"https://wpengine.com\">WP Engine</a>", "AuthorURI": "https://wpengine.com", "TextDomain": "autoupdater", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "WP Engine Smart Plugin Manager", "AuthorName": "WP Engine" }, { "GitHub URI": "", "Name": "Classic Editor", "PluginURI": "https://ww.wp.xz.cn/plugins/classic-editor/", "Version": "1.6.2", "Description": "Enables the WordPress classic editor and the old-style Edit Post screen with TinyMCE, Meta Boxes, etc. Supports the older plugins that extend this screen. <cite>By <a href=\"https://github.com/WordPress/classic-editor/\">WordPress Contributors</a>.</cite>", "Author": "<a href=\"https://github.com/WordPress/classic-editor/\">WordPress Contributors</a>", "AuthorURI": "https://github.com/WordPress/classic-editor/", "TextDomain": "classic-editor", "DomainPath": "/languages", "Network": false, "RequiresWP": "4.9", "RequiresPHP": "5.2.4", "Title": "<a href=\"https://ww.wp.xz.cn/plugins/classic-editor/\">Classic Editor</a>", "AuthorName": "WordPress Contributors" }, { "GitHub URI": "", "Name": "Cloudinary", "PluginURI": "https://cloudinary.com/documentation/wordpress_integration", "Version": "2.7.5", "Description": "With the Cloudinary plugin, you can upload and manage your media assets in the cloud, then deliver them to your users through a fast content delivery network, improving your website\u2019s loading speed and overall user experience. Apply multiple transformations and take advantage of a full digital asset management solution without leaving WordPress. <cite>By <a href=\"https://cloudinary.com/\">Cloudinary Ltd., XWP</a>.</cite>", "Author": "<a href=\"https://cloudinary.com/\">Cloudinary Ltd., XWP</a>", "AuthorURI": "https://cloudinary.com/", "TextDomain": "cloudinary", "DomainPath": "/languages", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"https://cloudinary.com/documentation/wordpress_integration\">Cloudinary</a>", "AuthorName": "Cloudinary Ltd., XWP" }, { "GitHub URI": "", "Name": "Custom Hooks", "PluginURI": "https://facetwp.com/", "Version": "1.0", "Description": "A container for custom hooks <cite>By FacetWP, LLC.</cite>", "Author": "FacetWP, LLC", "AuthorURI": "", "TextDomain": "custom-hooks", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"https://facetwp.com/\">Custom Hooks</a>", "AuthorName": "FacetWP, LLC" }, { "GitHub URI": "", "Name": "Enable Media Replace", "PluginURI": "https://ww.wp.xz.cn/plugins/enable-media-replace/", "Version": "3.5.0", "Description": "Enable replacing media files by uploading a new file in the “Edit Media” section of the WordPress Media Library. <cite>By <a href=\"https://shortpixel.com\">ShortPixel</a>.</cite>", "Author": "<a href=\"https://shortpixel.com\">ShortPixel</a>", "AuthorURI": "https://shortpixel.com", "TextDomain": "enable-media-replace", "DomainPath": "/languages", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"https://ww.wp.xz.cn/plugins/enable-media-replace/\">Enable Media Replace</a>", "AuthorName": "ShortPixel" }, { "GitHub URI": "", "Name": "FacetWP", "PluginURI": "", "Version": "3.3.1", "Description": "Advanced Filtering for WordPress <cite>By <a href=\"https://facetwp.com/\">FacetWP, LLC</a>.</cite>", "Author": "<a href=\"https://facetwp.com/\">FacetWP, LLC</a>", "AuthorURI": "https://facetwp.com/", "TextDomain": "facet-wp", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "FacetWP", "AuthorName": "FacetWP, LLC" }, { "GitHub URI": "", "Name": "Font Awesome", "PluginURI": "https://fontawesome.com/how-to-use/on-the-web/using-with/wordpress", "Version": "4.0.0-rc23", "Description": "The official way to use Font Awesome Free or Pro icons on your site, brought to you by the Font Awesome team. <cite>By <a href=\"https://fontawesome.com/\">Font Awesome</a>.</cite>", "Author": "<a href=\"https://fontawesome.com/\">Font Awesome</a>", "AuthorURI": "https://fontawesome.com/", "TextDomain": "font-awesome", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"https://fontawesome.com/how-to-use/on-the-web/using-with/wordpress\">Font Awesome</a>", "AuthorName": "Font Awesome" }, { "GitHub URI": "", "Name": "Site Kit by Google", "PluginURI": "https://sitekit.withgoogle.com", "Version": "1.37.0", "Description": "Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web. <cite>By <a href=\"https://opensource.google.com\">Google</a>.</cite>", "Author": "<a href=\"https://opensource.google.com\">Google</a>", "AuthorURI": "https://opensource.google.com", "TextDomain": "google-site-kit", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"https://sitekit.withgoogle.com\">Site Kit by Google</a>", "AuthorName": "Google" }, { "GitHub URI": "", "Name": "Google XML Sitemaps", "PluginURI": "http://www.arnebrachhold.de/redir/sitemap-home/", "Version": "4.1.1", "Description": "This plugin improves SEO using sitemaps for best indexation by search engines like Google, Bing, Yahoo and others. <cite>By <a href=\"http://www.arnebrachhold.de/\">Auctollo</a>.</cite>", "Author": "<a href=\"http://www.arnebrachhold.de/\">Auctollo</a>", "AuthorURI": "http://www.arnebrachhold.de/", "TextDomain": "sitemap", "DomainPath": "/lang", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"http://www.arnebrachhold.de/redir/sitemap-home/\">Google XML Sitemaps</a>", "AuthorName": "Auctollo" }, { "GitHub URI": "", "Name": "Head & Footer Code", "PluginURI": "https://urosevic.net/wordpress/plugins/head-footer-code/", "Version": "1.2.2", "Description": "Easy add site-wide and/or article specific custom code to head and/or footer sections (before the </head> or </body> or opening <body>) by hooking to <code>wp_head</code>, <code>wp_footer</code> and <code>wp_body_open</code>. <cite>By <a href=\"https://urosevic.net/\">Aleksandar Urosevic</a>.</cite>", "Author": "<a href=\"https://urosevic.net/\">Aleksandar Urosevic</a>", "AuthorURI": "https://urosevic.net/", "TextDomain": "head-footer-code", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"https://urosevic.net/wordpress/plugins/head-footer-code/\">Head & Footer Code</a>", "AuthorName": "Aleksandar Urosevic" }, { "GitHub URI": "", "Name": "Jetpack", "PluginURI": "https://jetpack.com", "Version": "9.9.1", "Description": "Security, performance, and marketing tools made by WordPress experts. Jetpack keeps your site protected so you can focus on more important things. <cite>By <a href=\"https://jetpack.com\">Automattic</a>.</cite>", "Author": "<a href=\"https://jetpack.com\">Automattic</a>", "AuthorURI": "https://jetpack.com", "TextDomain": "jetpack", "DomainPath": "", "Network": false, "RequiresWP": "5.7", "RequiresPHP": "5.6", "Title": "<a href=\"https://jetpack.com\">Jetpack</a>", "AuthorName": "Automattic" }, { "GitHub URI": "", "Name": "Post Duplicator", "PluginURI": "", "Version": "2.23", "Description": "Creates functionality to duplicate any and all post types, including taxonomies & custom fields <cite>By <a href=\"http://www.metaphorcreations.com\">Metaphor Creations</a>.</cite>", "Author": "<a href=\"http://www.metaphorcreations.com\">Metaphor Creations</a>", "AuthorURI": "http://www.metaphorcreations.com", "TextDomain": "post-duplicator", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "Post Duplicator", "AuthorName": "Metaphor Creations" }, { "GitHub URI": "", "Name": "Remove Widget Titles", "PluginURI": "http://scratch99.com/wordpress/plugins/remove-widget-titles/", "Version": "1.0", "Description": "Removes the title from any widget that has a title starting with the “!” character. <cite>By <a href=\"http://www.scratch99.com/\">Stephen Cronin</a>.</cite>", "Author": "<a href=\"http://www.scratch99.com/\">Stephen Cronin</a>", "AuthorURI": "http://www.scratch99.com/", "TextDomain": "remove-widget-titles", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"http://scratch99.com/wordpress/plugins/remove-widget-titles/\">Remove Widget Titles</a>", "AuthorName": "Stephen Cronin" }, { "GitHub URI": "", "Name": "WP REST API", "PluginURI": "https://github.com/WP-API/WP-API", "Version": "2.0-beta15", "Description": "JSON-based REST API for WordPress, originally developed as part of GSoC 2013. <cite>By <a href=\"http://v2.wp-api.org\">WP REST API Team</a>.</cite>", "Author": "<a href=\"http://v2.wp-api.org\">WP REST API Team</a>", "AuthorURI": "http://v2.wp-api.org", "TextDomain": "rest-api", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"https://github.com/WP-API/WP-API\">WP REST API</a>", "AuthorName": "WP REST API Team" }, { "GitHub URI": "", "Name": "SearchWP", "PluginURI": "https://searchwp.com/", "Version": "4.1.21", "Description": "The best WordPress search you can find <cite>By <a href=\"https://searchwp.com/\">SearchWP</a>.</cite>", "Author": "<a href=\"https://searchwp.com/\">SearchWP</a>", "AuthorURI": "https://searchwp.com/", "TextDomain": "searchwp", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"https://searchwp.com/\">SearchWP</a>", "AuthorName": "SearchWP" }, { "GitHub URI": "", "Name": "SVG Support", "PluginURI": "http://ww.wp.xz.cn/plugins/svg-support/", "Version": "2.3.18", "Description": "Upload SVG files to the Media Library and render SVG files inline for direct styling/animation of an SVG’s internal elements using CSS/JS. <cite>By <a href=\"https://benbodhi.com\">Benbodhi</a>.</cite>", "Author": "<a href=\"https://benbodhi.com\">Benbodhi</a>", "AuthorURI": "https://benbodhi.com", "TextDomain": "svg-support", "DomainPath": "/languages", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"http://ww.wp.xz.cn/plugins/svg-support/\">SVG Support</a>", "AuthorName": "Benbodhi" }, { "GitHub URI": "", "Name": "Timber", "PluginURI": "https://upstatement.com/timber", "Version": "1.18.2", "Description": "The WordPress Timber Library allows you to write themes using the power of Twig templates. <cite>By <a href=\"http://upstatement.com/\">Jared Novack + Upstatement</a>.</cite>", "Author": "<a href=\"http://upstatement.com/\">Jared Novack + Upstatement</a>", "AuthorURI": "http://upstatement.com/", "TextDomain": "timber-library", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"https://upstatement.com/timber\">Timber</a>", "AuthorName": "Jared Novack + Upstatement" }, { "GitHub URI": "", "Name": "User Role Editor", "PluginURI": "https://www.role-editor.com", "Version": "4.60.1", "Description": "Change/add/delete WordPress user roles and capabilities. <cite>By <a href=\"https://www.role-editor.com\">Vladimir Garagulya</a>.</cite>", "Author": "<a href=\"https://www.role-editor.com\">Vladimir Garagulya</a>", "AuthorURI": "https://www.role-editor.com", "TextDomain": "user-role-editor", "DomainPath": "/lang/", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"https://www.role-editor.com\">User Role Editor</a>", "AuthorName": "Vladimir Garagulya" }, { "GitHub URI": "", "Name": "Widget Logic", "PluginURI": "", "Version": "5.10.4", "Description": "Control widgets with WP’s conditional tags is_home etc <cite>By <a href=\"https://wpchef.org\">WPChef</a>.</cite>", "Author": "<a href=\"https://wpchef.org\">WPChef</a>", "AuthorURI": "https://wpchef.org", "TextDomain": "widget-logic", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "Widget Logic", "AuthorName": "WPChef" }, { "GitHub URI": "", "Name": "WP Help", "PluginURI": "http://txfx.net/wordpress-plugins/wp-help/", "Version": "1.7.0", "Description": "Administrators can create detailed, hierarchical documentation for the site’s authors and editors, viewable in the WordPress admin. <cite>By <a href=\"http://coveredwebservices.com/\">Mark Jaquith</a>.</cite>", "Author": "<a href=\"http://coveredwebservices.com/\">Mark Jaquith</a>", "AuthorURI": "http://coveredwebservices.com/", "TextDomain": "wp-help", "DomainPath": "/languages", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"http://txfx.net/wordpress-plugins/wp-help/\">WP Help</a>", "AuthorName": "Mark Jaquith" }, { "GitHub URI": "", "Name": "WP Webhooks", "PluginURI": "https://wp-webhooks.com/", "Version": "3.2.0", "Description": "Put your website on autopilot by using webhooks to get rid of manual tasks and focus on what’s really important for your business. <cite>By <a href=\"https://wp-webhooks.com/about/\">Ironikus</a>.</cite>", "Author": "<a href=\"https://wp-webhooks.com/about/\">Ironikus</a>", "AuthorURI": "https://wp-webhooks.com/about/", "TextDomain": "wp-webhooks", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "<a href=\"https://wp-webhooks.com/\">WP Webhooks</a>", "AuthorName": "Ironikus" }, { "GitHub URI": "", "Name": "Zapier for WordPress", "PluginURI": "", "Version": "1.0.2", "Description": "Zapier enables you to automatically share your posts to social media, create WordPress posts from Mailchimp newsletters, and much more. Visit https://zapier.com/apps/wordpress/integrations for more details. <cite>By <a href=\"https://zapier.com\">Zapier</a>.</cite>", "Author": "<a href=\"https://zapier.com\">Zapier</a>", "AuthorURI": "https://zapier.com", "TextDomain": "zapier", "DomainPath": "", "Network": false, "RequiresWP": "", "RequiresPHP": "", "Title": "Zapier for WordPress", "AuthorName": "Zapier" } ] }, "config_report": { "cloudinary": [], "about": [], "usage": null, "last_usage": { "plan": "Free Classic", "last_updated": "2021-08-08", "transformations": { "usage": 1142, "limit": 20000, "used_percent": 5.71 }, "objects": { "usage": 1151, "limit": 300000, "used_percent": 0.38 }, "bandwidth": { "usage": 4094790731, "limit": 21474836480, "used_percent": 19.07 }, "storage": { "usage": 2859384787, "limit": 10737418240, "used_percent": 26.629999999999999 }, "requests": 4094790731, "resources": 783, "derived_resources": 368, "media_limits": { "image_max_size_bytes": 10485760, "video_max_size_bytes": 104857600, "raw_max_size_bytes": 10485760, "image_max_px": 25000000, "asset_max_total_px": 50000000 }, "max_image_size": 10485760, "max_video_size": 104857600 }, "signature": "62a9507041a45f40796eb54342fe8bc5", "version": null, "status": { "status": "ok" }, "media_display": { "image_optimization": "on", "image_format": "auto", "image_quality": "auto", "enable_breakpoints": "off", "breakpoints": "5", "bytes_step": "200", "max_width": "2560", "min_width": "375", "image_preview": "https://res.cloudinary.com/demo/image/upload/w_600/sample.jpg", "video_player": "wp", "video_controls": "on", "video_loop": "off", "video_autoplay_mode": "off", "video_limit_bitrate": "off", "video_bitrate": "500", "video_optimization": "on", "video_format": "auto", "video_quality": "auto" }, "setup": { "enable_report": "on" }, "sync_media": { "auto_sync": "on", "cloudinary_folder": ".", "offload": "dual_full" }, "gallery": { "transition": "fade", "aspectRatio": "3:4", "navigation": "always", "zoom": true, "carouselLocation": "top", "carouselOffset": 5, "carouselStyle": "thumbnails", "displayProps": { "mode": "classic", "columns": 1 }, "indicatorProps": { "shape": "round" }, "themeProps": { "primary": "#cf2e2e", "onPrimary": "#000000", "active": "#777777" }, "zoomProps": { "type": "popup", "viewerPosition": "bottom", "trigger": "click" }, "thumbnailProps": { "width": 64, "height": 64, "navigationShape": "radius", "selectedStyle": "gradient", "selectedBorderPosition": "all", "selectedBorderWidth": 4, "mediaSymbolShape": "round" }, "cloudName": "champion-power-equipment", "container": "" } } }-
This reply was modified 4 years, 10 months ago by
James Huff.
-
This reply was modified 4 years, 10 months ago by
Marius L. J.. Reason: Removed credentials accidentally included in debug data
Here are the screenshots you asked for: https://imgur.com/a/y4o2TVl
The system report is in another comment that’s in the moderation queue.
Whoops, wrong support thread, sorry! Another support thread asked for those. One sec, I’ll post those to the right place and then answer your questions.
Looks like the Timber-generated images are stored in the
wp-content/uploadsfolder: https://imgur.com/a/Rh8mYKmI’m not sure how to clear the site cache — I’m on my local development environment and not running any caching plugins.
Hi @spaceninja,
Actually, someone reported a similar issue several months ago with the same setup ACF/Timber/Cloudinary. I don’t have the full resolution as he solved it by himself but he did mention it was due to transient cache on Timber.
Looking here, can you try to set a cache mode other than the default one which is the transient one?
Hope that helps.
Best,
LoicThanks for the suggestion — I tried changing my render function like so:
Timber::render( 'templates/flexible-content/page-flexible-content.twig', $context, false, Timber\Loader::CACHE_NONE );But it had no effect — any image using a Timber transform was still loaded from WordPress, not Cloudinary.
Related question: I’m currently attempting to solve this problem by registering my own custom Twig filter, which I will run on the image src URL that I have access to in my Twig template.
I need to insert Cloudinary’s scale URL params, like
w_700. I could do this with a simple regex to insert it in the right place, but I’d prefer to generate a clean Cloudinary URL with the appropriate parameters.http://cloudinary.github.io/cloudinary_wordpress/index.html
The plugin docs say that the plugin exposes a bunch actions and filters, and some of these look promising. For instance, if I can get the Cloudinary ID by providing the WordPress attachment ID, then I could construct my own Cloudinary URL.
Or, if I could access the
cloudinary_urlfunction: http://cloudinary.github.io/cloudinary_wordpress/php_class-media.php.html#line984Is there a way for me to access any of those functions?
Hi @spaceninja,
I was discussing this issue with my developer and we think you would be a good use case for our beta program. In a few words, we have a new way to deliver assets and we will be able to adjust the image size regardless of the PHP code to fit exactly the container dimension.
In your case, instead of using the resize method, you will just need to care about the container dimension and we will do the rest. Would you be keen to try it out?
In the meantime, would you mind also creating a support ticket to [email protected]? I would like to talk to you about your credentials.
Thanks in advance.
Best,
Loic -
This reply was modified 4 years, 10 months ago by
The topic ‘Cloudinary and ACF/Twig templates’ is closed to new replies.