Questions tagged [assets]

Files managed by Craft, stored in physical folders or (with Craft Pro) on Amazon S3, Rackspace Cloud, and Google Cloud.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

Assets uploaded only to temp folder (first upload only)

I have a Craft installation (v3.7.4) with an Amazon S3 plugin (v1.2.12). I have an asset field configured to upload to an Amazon S3 volume. IAM roles are properly configured, files get uploaded to S3 -...
1
vote
2answers
29 views

Enupal Snapshot: Fail to save setting for Craft Nitro with status code '127'

I keep having issues when trying to save the settings for Enupal Snapshot at Craft Nitro, Below is the error message I found at the log file, [enupal\snapshot\Snapshot::error] Something went wrong ...
1
vote
1answer
20 views

Cache Excesive Assets Size

I have only been using Craft 3 for a short time and I am currently the webmaster of a too big news site. I just checked that the /storage folder is almost 80GB in size. All the size is in the /storage ...
1
vote
1answer
22 views

New assets field not showing up for some users

I've added an assets field to an existing channel that shows up fine for me on both the new entry and editing existing entries, but it's not showing up for some users. I've cleared cache in Craft ...
1
vote
1answer
19 views

How do I get the content from a text or html file in an assets directory to be displayed?

I'm looking to display/print the contents of an html or text file uploaded into assets. Not sure what parameter to access though. Any help would be much appreciated!
1
vote
1answer
27 views

Rename Assets on Import?

I'm using Feed-Me to import a json file from Instagram. The filenames I get for my images from Instagram are MEGA long. Feed-Me is also changing any _ in the name to a space. I'm looking for a way ...
0
votes
0answers
32 views

Automatic Asset Cache Clear

I have a large website that various users need to upload important documents (assets) to frequently. I need to have the Craft asset cache clear every time a new asset is uploaded. The other option I'...
0
votes
0answers
26 views

craft cms how to modify redactor image upload path

So for my assets field types, I have the Asset Location (Where selected assets should be stored.) set to: {owner.type.name}/{owner.slug} this neatly puts all the files I upload via the asset field ...
1
vote
2answers
35 views

How to upload animated webp files?

I've created an asset volume to which I can successfully upload jpgs, pngs, static webps etc. But when I try to upload an animated webp I get the alert: Upload failed. The error message was: “The file ...
1
vote
1answer
46 views

Search for assets containing a custom field

How can I search for assets containing a custom field? The field on the asset is called lang. When I use this code no assets are found. {% set folderId = craft.app.request.getQueryParam('folderId') %} ...
0
votes
0answers
12 views

When Asset is Located in Root of Asset Volume - asset.getPath() Does Not Return the Volume as Part of the File Path

Context Asset Volume: staff (I'm using an S3 bucket as the source type) Image location: staff/john-smith.jpg Version: Craft 2.7.8 Results I expected that this query {{ staff.portrait[0].getPath() }} ...
1
vote
1answer
36 views

How would I detect whether an entry's asset field has been updated on save?

We need to send a notification email when an entry's asset field, Custom Image, has been updated on entry save. We're able to do this consistently for text fields but I'm having trouble doing the same ...
1
vote
1answer
39 views

Serve remote files instead of local ones (with a nitro setup)

I'm new to CraftCMS and slowly learning how to use it. I'm creating a site. The local setup was done with Nitro. I have read about the ways to synchronize data and assets across environments. But I ...
0
votes
0answers
23 views

Image thumnail not found(404) issue. What causes the header to set as image/svg+xml instead of png/jpeg?

Thumbnails not loading in assets list in my control panel with my host platform.sh(works in my local docker env). Call to index.php?p=admin/actions/assets/thumb&uid=29dad26b-ba90-4b26-b9fb-...
2
votes
1answer
50 views

Showing and playing video's in Twig templates

I want to be able to upload and play videos on my Craft CMS website. I created a volume and field to hold these videos. So far so good, but whenever I want to output the video in a video tag I'm not ...
1
vote
0answers
26 views

Is there a way to prompt for confirmation in cp?

I have a custom plugin that checks for assets filename, and I'd like to prompt for confirmation like in the example below. Is there a way to do that in Cp? If user clicks No then $event->isValid = ...
3
votes
1answer
37 views

How to fetch all assets that are in use, via a specific field

We have a channel of entries which all include the same asset field. We are trying to fetch all assets that are actively in use, ergo the assets which have been linked to any of the entries in the ...
1
vote
0answers
39 views

Changing assets location in entries after moving them to a different volume

I've moved all the assets from a local volume to a DigitalOcean space (S3 compatible) and all new entries are using that volume. I've updated all assets fields to use that new location. My problem is ...
2
votes
1answer
30 views

Getting assets from an entry programatically

I want to get the id of an asset I've set for a feature image on an entry. To find the entry I'm using the slug as the criteria like so: $entry = Entry::find() ->slug('0002') ->one(); In ...
2
votes
1answer
43 views

Assets S3 Cache Duration and CP Thumbnails

What does everyone consider a sensible cache duration to use when using Assets with S3/Cloudfront? Is 3 hours sensible or should it be longer? Secondly, does this have any impact on the assets being ...
1
vote
1answer
53 views

Craft CMS - 3.6.11.1 - Why are Assets Backed Up to Temporary Storage?

Since updating Craft CMS to the latest version I noticed that our uploaded files get backed-up daily to temporary storage. Uploaded files live on DigitalOcean Spaces so we have no need to back up ...
1
vote
1answer
25 views

Craft adds unwanted date to filename

How to remove the date behind a asset filename or prevent add a date behind the filename? I'll have a plugin that's modifies an existing pdf with SETA SIGN. To do so I'm copy the current asset, modify ...
1
vote
1answer
51 views

Importing data from an old EE site

I've been asked to export some data from an old EEv2 site into a Craft site. I thought I should be able to export the data from EE into CSV or XML and then use FeedMe to import it. But one of the ...
1
vote
1answer
27 views

Upload file issue on Craft 2.9.2

This issue is occurring on Craft 2.9.2. The assets are stored on Amazon AWS (S3). When I try to uploaded a new asset (of any size, even very small), the progress bar moves to 100% position but remains ...
0
votes
0answers
14 views

Can't delete sub folders

I have an issue where I cannot permanently delete a sub-folder from the "Assets" section in the control panel. When I delete the sub-folder, it does delete, however after logging out or a ...
1
vote
1answer
19 views

How to hide the assets section of the control panel to specific user groups?

I need to hide the assets section of the control panel to a given user group. Changing the group permissions to prevent them from viewing all asset volumes also prevents them from uploading assets in ...
1
vote
1answer
46 views

How do you insert the site name into a default asset path?

Multisite question.... how do I output the site into the assets path? currentSite won't work because its the admin panel, so the current site is always the default site. Using the below, I will always ...
1
vote
1answer
45 views

Get image asset relative url

I'm using image transforms and getUrl() method to display an image. I'm using Blitz to export my site as a static website. My problem is that .html pages get cached with images that have full urls ...
0
votes
0answers
63 views

Trouble generating correct srcset sizes using getSrcset()

I'm trying to figure out the getSrcset() method, going by the docs here. When I try it using the code in that example (I modified to account for a Matrix field but other than that it is the code below)...
2
votes
1answer
22 views

Deleting one or all Assets from a fieldusing a front end form

Good afternoon All, Im trying to setup the ability for users to delete 1 or more of their own images from a multi photo asset field and have got stuck. This is what is have so far, I assumed adding a ...
1
vote
1answer
49 views

Display list of assets that are in use?

I am very new to Craft and how it works. I've got a client with a Craft site (v2.9.2), that I help them with. It was created by another developer. I want to help them tidy up their Assets. There are ...
0
votes
0answers
13 views

How to empty the Temporary Uploads folder and why can individual users not delete files within up this folder?

I am perhaps over looking something, but I cannot see anyway for an back-end user (not admin) to be able to remove/clean up their Temporary Uploads folder. As a full admin, I see the option to remove ...
1
vote
1answer
26 views

Does deleting an original asset but keeping the transform folder asset make Craft replace the original file with the biggest transform?

I have a client who has uploaded many giant images to the CMS (8mb+). I'd like to free up that space now that those image have been transformed to more web-friendly sizes. Is it safe for me to delete ...
0
votes
0answers
11 views

Updating uploaded assets directory structure

How can i update uploaded assets directory structure, when i change assets field "Default Asset Location" settings - so files match this new setting? I have so much files all in one ...
0
votes
0answers
27 views

What’s the pattern for Entry Form inputs for Assets meta data fields?

The templating pattern for Entry Form inputs for Assets files is clear enough. But how can I provide inputs in an Entry Form for meta data pertaining to an Assets file? For example, I have fields like:...
1
vote
2answers
67 views

How to Get Asset Volume Name

Trying to figure out how to get the "name" and "handle" of an asset volume, given the volume ID. Tried all the obvious things, no luck!
1
vote
1answer
44 views

Create folder in asset volume via GraphQL

Is it possible to create a subfolder within an asset volume via GraphQL? If yes, can you point me in the right direction? I just found mutations for file uploading, but nothing for folder creation. ...
0
votes
0answers
22 views

Migrating assets from remote volume (Cloudinary) to local folder

I need to migrate an asset volume from Cloudinary to local folder. What is the appropriate strategy to execute the change while maintaining database integrity? Can I simply change the volume type to ...
2
votes
1answer
58 views

How to detect white background

In my product catalog, some product images need to have the css attribute object-fit: cover while some need the object-fit: contain: I'd like to detect the white background, possibly on upload (to ...
1
vote
1answer
44 views

Viewing Assets (PDFs) associated with an entry directly from that entry screen

I have a channel with an Assets field, designed to hold PDF files. It works fine to select one or more files, and/or upload files and select them. However, I'm wondering if there is a way to view a ...
0
votes
0answers
12 views

Can't list S3 buckets from Craft behind a firewall

We are using Craft2, and want to move the assets to Amazon AWS S3. We have two instances of Craft2, one on AWS, and one on a onprem server. The bucket is made (and is on eu-west-1) and the IAM user ...
0
votes
0answers
18 views

Entry ancestors is null in dynamic asset subfolder path or during EVENT_AFTER_SAVE event

I'd like to use the slug of the top-level entry in a structure in an asset's dynamic folder subpath. I have a structure where the entry I'm concerned with for this question can sit at either the ...
1
vote
2answers
102 views

Video Asset URLs not rendering

I'm trying to output the video files from within a block but get a Calling unknown method: craft\elements\db\AssetQuery::url() error when using the following: {{ block.video.videoFileWebm.url }} ...
1
vote
1answer
28 views

Loading assets cross-domain with SSL or non-SSL option

Here's a unique situation. I have three websites. All assets are stored at the domain of the first site: domain.com/files/* The first two sites run completely over SSL. No problem. The third site ...
2
votes
2answers
47 views

Enironment Variable being rendered literal

OK, So created 2 variables in my local .env file ASSET_BASE_URL="https://mysite.local/resources" ASSET_BASE_PATH="/Volumes/yada/yada/yada/resources" Then in the CP, created a new ...
0
votes
0answers
15 views

Event or hook to access when needing to show session messages via AJAX within Asset Events in the control panel

I am using EVENT_BEFORE_HANDLE_FILE on the asset class to moderate images before they are uploaded. I am setting session errors which show fine on the frontend templates on page refresh, however in ...
0
votes
0answers
208 views

Path to asset file shows “Template not found!”

I have a headless Craft CMS site and now the frontend development should start. I have absolutely no frontend or templates as I only worked on the backend. The asset url got created at /images. If for ...
0
votes
0answers
77 views

AWS S3 permissions issues with referrer conditions

I've got an odd situation happening with assets stored on AWS S3, which I'd appreciate some help understanding and resolving. Background Software Version: Craft CMS v2.9.1 All S3 assets were recently ...
1
vote
1answer
41 views

Set asset uploader from frontend entry form

Now that Craft keeps track of which user uploaded an asset, I'm wondering if it's possible to set this information when an asset is uploaded via a frontend entry form. I have a form that includes an ...
0
votes
0answers
27 views

Form field as 'Upload Location Subfolder'

Question concerning the Freeform plugin: Is it possible to set the contents of a text field as my 'Upload Location Subfolder' of a file upload field? I tried stuff like {{ form.customerName }} and {{ ...

1
2 3 4 5
17