Search the Community
Showing results for tags 'assets'.
-
Happy Friday, everyone. I'm starting this Friday with something I meant to do last Friday! The latest version of MediaHub (1.19.25) is now available, and thanks to our testers, we have improvements across the UI, module performance and some new features too. Existing Media hubbers: Download here New to hubbing: Read here Full changelog: Read here What's new and improved in 1.19.25... Upload screen refresh Uploading is one of the first things a new user will do, so the first impression should be positive, distraction-free and simple. But behind a screen that seemingly has 'just one job', people asked if they could organise their uploads from here. While organising uploaded assets within the Library is simple, being able to associate your uploads with your Collections and Labels from the upload screen will save you a lot of time and asset admin. An "Organise uploads" bar above the dropzone lets you assign Collections and Labels before the batch starts. If one doesn't exist yet, you can create it from here. A scrollable card queue replaces the old list. Each file shows a thumbnail or file-type icon, inline status, and a per-file progress bar. Oversized or unsupported files stage with a clear warning and are excluded from the upload. Inline filename editing on each card is possible before you upload. We'll introduce a table view shortly if you're uploading at scale and want to sort and filter at this point. Once your upload starts, you can see the progress of each file and a master progress bar. Custom fields on assets Adding custom fields to a MediaHub input field works the same way as the existing workflow. Should you wish, you can also assign custom fields to a master asset depending on your use case. You can assign custom fields to your master asset or just the MediaHub field on your page. They work indenpendently when you want, but also have a relationship with and inherit-with-override model. Inherit-with-override works the same way Title and Alt already do: The asset detail page (left) holds the canonical (library-level) value. Every reference inherits it by default. On a page, custom fields appear below Title, Filename, Description, and Tags. An editor can override the value for that one reference only. The override saves when the page saves, no separate save button A small reset control next to any overridden field lets you revert to the library value in one click On a MediaHub input field, a developer can choose to display custom fields in a different order than on the asset detail page Two tiers Some metadata belongs to the asset everywhere (a photographer credit, a licence URL). Other metadata belongs to how the asset is used in a specific field. Both are supported: Asset-level fields go on pkd-mediahub-asset. Master value plus per-reference override and reset Field-specific fields go on a template named mediahub-field-{fieldName} (mirrors ProcessWire's native pattern). These appear only in that field's drawer and are per-reference only, no library master I hadn't planned on allowing custom fields on the asset detail page, but it was straightforward once I added some of the standard text-based fields. It works in the same way you'd add a field to any template and doesn't even require the extra custom field to input field step (creating an extra fileless template). Anything on that asset template that isn’t one of MediaHub’s built-in fields: title, image, alt, labels, collections, and so on - is treated as yours. Should you wish to uninstall MediaHub, we have safeguards in place to keep your custom fields on your ProcessWire install, which is what I think you might want. The only real downside I have found so far is that custom fields on the master asset template show on every asset detail page, so a name like Photographer fits a photo but feels odd on a PDF or spreadsheet. What has worked for me is broader labels from the start (Source, Description). We plan to make this more asset-aware in a future release, but for now, name fields as if every asset type will see them, because they will. But, this is just a side note and doesn't affect input fields, which was the core feature and of the 1.19.25 release. Library thumbnails 1.19.25 takes a leaner approach to thumbnail generation and makes more effort to reuse thumbnails across the UI vs generating the full scope on upload and import. One preview at upload. Each image gets a single small proportional preview. That's 75% fewer auto-generated files at upload time. One library thumb per asset. Grid, Masonry, and List share one canonical thumbnail. CSS handles grid cropping. Built on first browse. The full library size is generated the first time you scroll an asset into view, not during upload. The upload preview is shown immediately as a placeholder so nothing looks broken while it's being prepared Import Existing Images and the asset picker use the same on-demand model. Bulk imports of existing assets from existing fields should feel noticeably lighter on disk and CPU. Library bulk actions and toolbar The search and filter area of the Library was cleaned up for consistency and clarity in advance of some architectural changes (more below) Selecting assets now swaps the breadcrumb row for a compact bulk action bar with actions for Collections, Labels, and Delete. There's a useful workflow change here: you can select assets first and then create and assign a collection in one step, rather than having to create the collection first. Library and picker consistency MediaHub looks like it has one central Library, but under the hood there are actually three slightly different versions of it: the main Library, the InputfieldMediaHub picker, and the TinyMCE picker. Over time I found that improvements made to the main Library were easy to overlook on the other two, since they didn't share any underlying code. To reduce that drift, 1.19.25 moves the toolbar, sidebar, filters, and tiles onto shared partials so all three surfaces stay aligned going forward. This isn't just a tidy-up under the hood either. It lightens the module overall, and it's what made it possible to introduce the Collections and Labels sidebar into Library screens that didn't have it before. Import page images The ability to import images from your existing fields was an early feature and has been in MediaHub since v1 1.19.25 gives it an overhaul. BTW the import Page Images button is optionally enabled in the field config so you can enable it on a field-by-field basis. Repeater and RepeaterMatrix support The scan now walks Repeater and RepeaterMatrix fields up to three levels deep. Results are grouped under breadcrumb headings so you can see exactly where each image came from. How matching works Each image on the page is scored against the whole Hub using four signals: filename stem file size dimensions and a perceptual hash (a 64-bit visual fingerprint that can match re-encoded or renamed copies). Each result gets a confidence badge: New - not currently in the Hub Exact match - identical file already in the Hub Likely match - looks like an asset already in the Hub Possible match - filename matches a Hub asset but the file content appears different Already added - already used in this field When a match is confirmed, MediaHub adds a reference to the existing asset rather than copying the file again. Hardening for large pagesThere's also longer scan and import time limits, JSON error handling, a 200-selection cap per request, and client-side checks so a timeout doesn't surface as a cryptic error. Import Page Images was one of MediaHub's earliest features, and I think there's more we can do here. The import modal in particular could use a bit more cleanup, so that's on the list. That's pretty much it. Thanks for reading and scrolling! MediaHub is currently available for single sites, developers of multiple sites and agencies. If you'd like to try it first, DM me. Have a great weekend, Peter
-
Hey everyone, MediaHub 1.19.0 is ready. That is good news for two reasons: you might find it useful, and you might be too distracted to wonder where 1.18 went. 🙂 Anywho, MH 1.19 has two main areas of improvement: the main MediaHub library screen (for editors) a new read API for galleries at scale (for developers). MediaHub Library changes A) Redesigned sidebar The sidebar has been redesigned and refined, with new shortcut filters at the top B) Favourites Mark any asset as a favourite (site-wide) and filter the library to favourites only. You can favourite from the asset detail page, the tile menu, or by dragging tiles onto Favourites in the sidebar. I am still debating Favourite/unfavourite vs star/unstar for the wording. Open to opinions there. C) Recent See your newest uploads and choose what “recent” means: last 24 hours, last 7 days, and other presets. More flexibility planned here soon. D) Filter breadcrumb type thing When you filter the library, a breadcrumb-style trail shows where you are (for example All Assets › Labels: Dublin). Clear a filter with one click instead of guessing how you narrowed the view. E) Labels If you use Labels for organisation, they are now a first-class shortcut in the sidebar, with counts per label. The section collapses when you do not need it. Drag assets onto a label row to assign in bulk; rename or delete from the row menu. F) Hover info on asset cards Hover over an asset to quickly see the title and filename without turning on Details view or opening the full asset page. This way, you get a really clean Library grid and still benefit from an in-betweeny view. G) Favourites (pt2) You can mark an asset as a favourite from the assets card/panel. Admittedly, 'unfavourite' is a little awkward-sounding. How does it read in German, Austrian, Bulgarian, Irish? I'll find out shortly. I might change this to star/unstar. MediaHub - drag and drop Another gap closed. You can drag and drop assets directly onto a MediaHub field. If you want to disable that function, you can do it on a field-by-field basis. You can also re-order assets as per the native input field. And if you're not a drag-and-drop fan, you can use the buttons instead. The MediaHub button will open your Library. Upload button opens your Finder. Uploads and drag-and-drop currently land new files in the root of the library in the background. I am planning more flexibility there soon. getRaw () API (beta) I'll be straight: I have not fully tested this myself on production sites yet, but I did run it through rigorous automated test scripts, and the performance benefits look promising. There is a more comprehensive write-up in the MediaHub docs. And I want to thank @David Karich for pushing this feature forward and flagging the original limitation in the first instance. Not strictly 1.19 related Search the docs The MediaHub documentation has a new search box in the sidebar Limitations and planned improvements Created a page with the known gaps in MediaHub. This is going to be a living (but rapidly shrinking) list as I move towards MediaHub 1.20.X. Get 1.19: About MediaHub: https://www.peterknight.digital/products/mediahub/ Upgrade to 1.19: https://www.peterknight.digital/downloads/mediahub/ Read the blog: https://www.peterknight.digital/blog/posts/mediahub-1-19-release/ Full changelog: https://www.peterknight.digital/docs/mediahub/v1/changelog/ Cheers 🍻 Peter
-
Hey everyone, MediaHub v1.17.0 is now available and introduces Focus Point support, SVG uploads, Input Field UI enhancements, and improved KONKAT compatibility. Existing customers: visit your account downloads area. New to MediaHub?: visit my in-progress landing page Full changelog: https://www.peterknight.digital/docs/mediahub/v1/changelog/ Release blog post https://www.peterknight.digital/blog/posts/mediahub-1-17-release/ Happy to answer questions here, but in the meantime, here are some screenshots. Focus Point support and focus point aware cropping. In the crop editor, you can now set and change the Focus point target.... As you might expect, crop presets and auto-generated crops snap to the focus point... SVG support Also in 1.17, driven by a request from @Stefanowitsch: SVG support for logos, icons, and illustrations that need to scale cleanly. SVG uploads are off by default. Enable them under Modules → Configure → MediaHub in the new SVG Support section. When turned on, uploads require the native ProcessWire FileValidatorSvgSanitizer module. If the sanitiser isn’t installed, uploads are refused rather than letting an unsanitised file through. InputField UI polishes Detail view is meant to show more per card, but the layout felt cluttered. Detail-mode cards now use a cleaner layout with a Crop · Focus · Edit action strip and inline file metadata. More to come on that front. It's somewhat based on the native Input Field view, but with a few tweaks. Konkat Theme If you run the ProcessWire KONKAT light admin theme, 1.17 includes improved compatibility across MediaHub’s admin screens. The asset detail page gets a cleaner card layout, a Modified column in the Crops table, and usage-aware delete confirmations (not shown) IE MediaHub warns you before deleting an asset or crop that’s still referenced elsewhere. Next up, as promised, I am working on improved support for batch operations, such as bulk upload and getRaw() support for massive libraries. Thans for reading. If you like what you see, I hope you can make MediaHub part of your next ProcessWire project 🙂 P
-
Hello again! I'm moving my website: Norwegian to Polish dictionary http://lizus.net (ca. 28k pages) from Glossword to ProcessWire. Everything looks great except one thing: for each page there is created empty subfolder in site/assets/files. So I've got ca. 28k empty and unused folders which takes around 4kB each on my server (sic!). The same situation is with site/assets/cache :/ Is there any solution to improve this? Best regards, Remi Turala.
-
Visit the GitHub repository or module directory for usage instructions. I believe there might be an issue with the module directory structure, as I'm unable to add the module. echo vite(['assets/css/app.css', 'assets/js/app.js']); Important Notes: For bug reports, feature requests, or contributions, please use the GitHub repository. The module is under active development, and updates may be frequent. Make sure to check the repository regularly for the latest version and improvements.
-
Hi, on a site I want to disable access to original images and only allow to access thumbnails and watermarked image variations. EDIT: A good solution for protecting original images can be found a bit down in this thread: Old content of this initial post:
-
Hello, we have many projects as pages containing images inside regular image fields and repeater matrix elements. Now we would like to organize our assets. ProcessWire saves assets with id as folder name and makes separate folders for repeater matrix elements. Is there a way to collect all assets of one page and export them in a folder with the page name/title? I think I could achieve this by using the command line wget for this website or maybe by a hook. But maybe someone has done this before. ? Regards, Andreas
-
Hi All! Currently Processwire saves the files in the assets directory as follows assets > files > pageid > jpg, doc, mp4, etc. But what happens I have a project that we developed 2 years ago and currently uses 2 TB of space because the majority of content is video, so I thought that if Processwire could save the files per year, it means that the structure is thus assets > files > year > Pageid > jpg, doc, mp4, etc. This in order to be able to create an NFS volume for each year and that the volume does not grow in an exaggerated way, since the bigger the volume, the longer the reading and writing times in that volume. Thanks
-
Hello, today I've tried the following: Use .htaccess to rewrite the url conditionally if an image file was not found. Rewrite target was http://www.this-is-the-live-system.com/site/assets/files/$1 I guess that would work out great. Unfortunately Processwire checks to see if the file exists and outputs an error message in the Page Editor. An option to disable this check would be great. (Similar to $config->debugIf = '::1'; or something) It would be great being able to just use the live database locally without broken images all over the place. I guess this might be a simple good enough solution for most use cases.
-
Hi! This is my first posting at this forum and I am on my first PW website. The CMS looks pretty cool and I like its approach of handling data. Well, there is just one thing I don't understand or perhaps that way is new to me. The assets management. My website (about 100 pages) has a slider with 3 images in its header. As I understand I have to attach an image always to a particular page. If I want to use the same image on another page, I have to upload it again. Right? I can't access it from a field on another page (beside access via TinyMCE). Thanks for help! Sebastian
-
- 6 replies
-
- cache
- directories
-
(and 2 more)
Tagged with:
-
I made a calendar view page in the admin using AdminCustomPages module, but since I want to add more functionality to it I am trying to make it (the calendar) its own module... So I have a module ProcessKalendar that extends Process and implements Module, ConfigurableModule. It creates the Kalendar page on installation and currently just outputs the input of the one config field for the module on that page on execution. I need to add scripts and stylesheets... How do I do this within the module?
-
Hey guys, Why does ProcessWire automatically creates folders for each page images? Is it possible to create and use my own folders for uploaded images? For example, I want a "projects" folder to store project images and a "blog" folder to store images from the blog. How can I do that?
-
Hello, Not sure I'm in the right section. I've just noticed something. In site > assets > files, there are folders apparently named after the id of the page in which the images are inserted in the admin. I'm developping a website locally this time, with version 2.5.0 now after an upgrade. It is the same for the first gallery rendered (before the upgrade) on it's own page and for the second gallery that've I've just rendered on the parent page of the page in which the images are inserted in the admin. For the first "gallery", the code is: foreach($page->children('include=hidden') as $child) { $thumb = $child->images->first()->width(320); echo "<a href='$child->external_url' target='_blank' rel='nofollow'><img src='$thumb->url' width='$thumb->width' height='$thumb->height' /></a>"; } (I've just updated this gallery code from width='320' height='200' to width='$thumb->width' height='$thumb->height') For the second gallery, it is: foreach($pages->get(1032)->images as $image) { $thumb = $image->width(90); echo "<a href='$image->url'><img src='$thumb->url' width='$thumb->width' height='$thumb->height' /></a>"; } For the first gallery, there are these versions: the original version (640x400), the .320x0.png version (320x200), in two folders a .300x212.png version (300x187 - perhaps old images with dimensions that I tested...(?)), and a .0x100.png version (160x100). For the second gallery, there are these versions: the original version (640x480), the .90x0.jpg version (90x68), and again a .0x100.jpg version (133x100). Where can I disable the creation of this .0x100.jpg version, in which file, is it "normal"? Thanks in advance !
-
Good day, gentlemen! Can ProcessWire use an /assets/ folder form a different domain/subdomain, as recommended for static content (http://developer.yahoo.com/performance/rules.html#cookie_free)? I looked into /index.php and it seems that the paths/URLs are stored as site root + folders (i.e /processwire/ + /site/assets/ for the assets url). The site root gets always prepended to the folders so I couldn't simply reassign the property.
- 14 replies
-
- cookieless
- domain
-
(and 3 more)
Tagged with:
-
Hi guys, I have a few questions regarding a few common practices when dealing with CMSes: 1- How can I install ProcessWire above the root for better security? 2- How can I change the default folder for uploading images? For example, I'd like to create a folder /uploads in the root and have all my uploaded images in there. And can I have multiple folders or just one folder for all images? 3- Is it possible to have site assets (css, js etc) stored in a folder /assets in the root? If you have other common practices or security tips etc and you'd like to share, please do.
- 6 replies
-
- common practices
- security
-
(and 2 more)
Tagged with:
-
Hello, beginner here. First, Processwire is amazing. I try it from yesterday and already made so much progress! A field allow me to unzip an archive in assets/. Now I would like to include in my template a stylesheet.css extracted from the archive. I think I meet some permission issue because nothing is included. Can you confirm and help me? $fontlist = $pages->get("/fonts/"); foreach($fontlist->children as $child){ $stylesheet = $child->webfont_archive->url.'stylesheet.css'; echo "<a href='".$stylesheet."'>".$stylesheet."</a>"; // This link is ok include($stylesheet); // Nothing here }
-
I'm building my first brand new Processwire site! It's easy and looks really extensible so I'm excited. However, I have a codeigniter app that is going to eventually sit in a directory beneath Processwire and I want to store assets like css, js, and images in a top-level directory that both CI and PW will access. Right now, I've accomplish this by using tags like `<img src="<?php echo $config->urls->templates ?>../../assets/images/russellbits-logo-small.png" alt="Russellbits"/>` Works fine, but it's messy. Is there another way I could do this in PW without making an http call?
- 2 replies
-
- codeigniter
- structure
-
(and 3 more)
Tagged with:
-
Firstly I am loving the CMS, so glad that I found it. I have worked with and tinkered with many and literally non have excited me except this one. I only started playing yesterday and I have a few questions I'd appreciate some advice on: tokens/sanitization/html fields For some of my fields I would like to be able to use tokens for example "It's in the [highlight]Game[/highlight]". Failing this I would like to create simple single line fields which accept some html tags like span/em/strong. Also in the stock installation I don't see a field that allows html - just a "Text" field. Thanks!
- 5 replies
-
- 1
-
-
- html fields
- tokens
-
(and 1 more)
Tagged with:
-
Hi, I'm currently trying to setup a multi server setup here and I was wondering if anybody has any experience in saving the /site/assets/files to a different server, currently I have a front-end templates server, a backend mysql server and a fileserver setup, I'm trying to implement PW into this flow, anybody has done this before? Kind regards!
-
Hi all! I was wondering if it's possible to set up custom destination directories for different templates and/or fields. The example would be the following: I have a custom field named 'pdfs' and everything it uploads goes to /assets/pdfs. And so on? You know what I mean? So the file url would be cleaner and meaningful. This way I would have some url organization for files, like: assets/brochures, or assets/pdfs. Thanks in advance!